Hi forum,
I am trying to stop Outlook from AutoMapping shared mailboxes.
Once connected via Powershell I am attempting to run the following commands, extracted from https://technet.microsoft.com/en-us/library/hh529943
$FixAutoMapping = Get-MailboxPermission sharedmailbox |where {$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false} $FixAutoMapping | Remove-MailboxPermission $FixAutoMapping | ForEach {Add-MailboxPermission -Identity $_.Identity -User $_.User -AccessRights:FullAccess -AutoMapping $false}
The first command seems to apply successfully, but fails on the second one
Are these the right commands to be running on Office 365?