Simple cheat sheet for Microsoft Exchange:

Get user pictures from Exchange:

https://webmail.DOMAIN.TLD/ews/exchange.asmx/s/[email protected]&size=HR648x648

Find latest sent or received email:

Get-MessageTrackingLog -ResultSize Unlimited -Start "06/16/2017" -Recipients "[email protected]" -EventID DELIVER

Get-MessageTrackingLog -ResultSize Unlimited -Start "06/15/2017" -Recipients "[email protected]" -EventID DELIVER

To make sure Exchange doesn’t strip the subject, notes and attachments:

Get-CalendarProcessing -Identity "RESOURCEMAILBOXNAME" | FL
Set-CalendarProcessing -Identity "RESOURCEMAILBOXNAME" -DeleteSubject $False -AddOrganizerToSubject $False -DeleteAttachments $False -DeleteComments $False

Mail enable a security group:

Enable-DistributionGroup -Identity "GROUPNAME"

Mail disable security group:

Disable-DistributionGroup -Identity "GROUPNAME"

Add Delegate to resource mailbox:

Set-CalendarProcessing -ResourceDelegates “GROUPNAME” -Identity “RESOURCEMAILBOXNAME”

Process external meeting requests:

Get-Mailbox "MEETINGROOMNAME" | Set-CalendarProcessing -ProcessExternalMeetingMessages $true

Get number of emails sent/received per user:

[Int] $intSent = $intRec = 0

Get-TransportServer | Get-MessageTrackingLog -ResultSize Unlimited -Start “12/10/2019” -End “12/31/2019” -Sender "[email protected]" -EventID RECEIVE | ? {$_.Source -eq "STOREDRIVER"} | ForEach { $intSent++ }

Get-TransportServer | Get-MessageTrackingLog -ResultSize Unlimited -Start “12/10/2019” -End “12/31/2019” -Recipients "[email protected]" -EventID DELIVER | ForEach { $intRec++ }

Write-Host "E-mails sent: ", $intSent

Write-Host "E-mails received:", $intRec

Import powershell commands:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;