Office 365 – Removing shared permissions to a calendar via PowerShell

Problem: Client wanted to remove select users from a shared calendar Solution:(h/t IQinIT) $cred = Get-Credential $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic –AllowRedirection Import-PSSession $session Get-MailboxFolderPermission -Identity user@domain.com:\Calendar| Select User, AccessRights, Deny Remove-MailboxFolderPermission -Identity user@domain.com:\Calendar -User user2@domain.com

Trying to import session into PowerShell for Office 365 gives you an error (no admin access)

Problem: You’re trying to connect to Office 365 through powershell and when you setup the session, it gives you an error that you don’t have sufficient rights. Solution: Odds are MFA is enabled across board. One way to tell, is Continue reading Trying to import session into PowerShell for Office 365 gives you an error (no admin access)