Exchange online powershell
Microsoft online Exchange powershell
Microsoft online Exchange powershell
Display microsoft Exchange Online mailbox information with Office 365 PowerShell
Display Exchange Online mailbox information with Office 365 PowerShell
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
Import-PSSession $Session
Remove-PSSession $Session
Display Microsoft Exchange Online mailbox information with Office 365 PowerShell
Get-Mailbox -Identity username
Get-Mailbox -Identity Username | Select-Object *
Or
Get-Mailbox -Identity username | FL
They are the same
Get-Mailbox -Identity username | Select-Object DisplayName, LitigationHoldEnabled, LitigationHoldDate, LitigationHoldOwner, LitigationHoldDuration
- -eq for equals (an exact match)
- -ne for not equals (not an exact match)
- -gt for greater than
- -lt for less than
Get-Mailbox | Where-Object {$_.}
Get-Mailbox | Where-Object {$_.LitigationHoldEnabled -eq $True}
For junk email report for users
Get-Mailbox | Get-MailboxJunkEmailConfiguration | Where-Object {$_.Enabled -eq $False}
Or
Get-Mailbox –Identity username | Get-MailboxJunkEmailConfiguration | Fl
Get-MailTrafficTopReport
Get-MailTrafficTopReport -StartDate 12/04/2016 -EndDate 12/05/2016 | Sort-Object -Property count | FT >d:\spammers.csv
As another example, this command returns only those cmdlets that include the word Junk somewhere in the cmdlet name:
Get-Command -Name “*Junk*” -Module $modName