Exchange Online PowerShell:
New-TenantAllowBlockListItems -ListType Sender -Block -NoExpiration -Entries badperson@example.com -Notes "My description"
Exchange Online PowerShell:
New-TenantAllowBlockListItems -ListType Sender -Block -NoExpiration -Entries badperson@example.com -Notes "My description"
To add "contoso.com" and "fabrikam.com" to jsmith@example.com's Outlook Trusted Senders list, and add "jane@adatum.com" to their Blocked Senders list, without affecting existing entries:
Set-MailboxJunkEmailConfiguration -Identity jsmith@example.com -TrustedSendersAndDomains @{Add="contoso.com","fabrikam.com"} -BlockedSendersAndDomains @{Add=jane@adatum.com}
To view the user's list of Trusted Senders:
(Get-MailboxJunkEmailConfiguration jsmith@example.com).TrustedSendersAndDomains
And to view Blocked Senders:
(Get-MailboxJunkEmailConfiguration jsmith@example.com).BlockedSendersAndDomains
From Exchange PowerShell:
# For every user mailbox, remove blocked senders with domains in $approvedDomainList $approvedDomainList = "gooddomainexample1.com","gooddomainexample2.com","gooddomainexample3" $user= Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | Select Identity $user | ForEach-Object { if ($blockedDomains = ($_ | Get-MailboxJunkEmailConfiguration).BlockedSendersAndDomains | Where-Object {$_.Split('@')[1] -in $approvedDomainList}) { $_ | Set-MailboxJunkEmailConfiguration –BlockedSendersAndDomains @{remove=$blockedDomains} Write-Host "Removed the following address(es) from {0}'s blocked list:`n`t{1}" -f $_.Name,($blockedDomains -join "`n`t") } }
Get a user's current calendar permissions:
Get-MailboxFolderPermission -Identity abc@example.com:\Calendar
Give another user PublishingEditor permissions:
Add-MailboxFolderPermission -Identity abc@example.com:\Calendar -User xyz@example.com -AccessRights PublishingEditor
Remove a user's permissions from the calendar:
Remove-MailboxFolderPermission -Identity abc@example.com:\Calendar -User xyz@example.com
Remove the intra-organisation connector:
Remove-IntraOrganizationConnector -Identity "HybridIOC - [ID]"
Ta, Microsoft.
Because having a GUI would be too easy, use the EMC to search message logs in recent versions of Exchange.
An example of searching for emails FROM bill@microsoft.com, from 25 Oct 2016 to 27 Oct 2016, outputting to a file:
Get-MessageTrackingLog -ResultSize Unlimited -Start "10/25/2016" -End "10/27/2016" -Sender "bill@microsoft.com" | Select-Object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,@{Name="Recipients";Expression={$_.Recipients}} | Export-CSV C:\temp\MessageLogResults.txt(Note that it seems to force you to use the United States date notation.)
Searching for emails TO bill@microsoft.com, from 25 Oct 2016 to 27 Oct 2016, outputting to a file:
Get-MessageTrackingLog -ResultSize Unlimited -Start "10/25/2016" -End "10/27/2016" -Recipients "bill@microsoft.com" | Select-Object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,@{Name="Recipients";Expression={$_.Recipients}} | Export-CSV C:\temp\MessageLogResults.txtIt's also the only way to search using a wildcard in older versions of Exchange.
Use this command:
ldifde -f delegates.txt -d "ou=Users,dc=domain,dc=com" -l name,publicDelegates,publicDelegatesBL -r "(|(publicDelegates=*)(publicDelegatesBL=*))"
Cheers, William Lefkovics.