PowerShell commands to Disable mailbox level services for specificed users. Works well for Microsoft 365 Cloud.
Disable Access to Mailbox
#Set $member to username of the user you wan
$member | Set-CASMailbox -OWAEnabled $false -PopEnabled $false -ImapEnabled $false -MAPIEnabled $false -ActiveSyncEnabled $false -EwsEnabled $false
Get-CASMailbox $member | Select-Object Name, OWAEnabled, PopEnabled, ImapEnabled, MAPIEnabled, ActiveSyncEnabled, EwsEnabled
==========================
Enable Access to Mailbox
#Set $member to username of the user you wan
$member | Set-CASMailbox -OWAEnabled $true -PopEnabled $true -ImapEnabled $true -MAPIEnabled $true -ActiveSyncEnabled $true -EwsEnabled $true
Get-CASMailbox $member | Select-Object Name, OWAEnabled, PopEnabled, ImapEnabled, MAPIEnabled, ActiveSyncEnabled, EwsEnabled
Disable Access to Mailbox
#Set $member to username of the user you wan
$member | Set-CASMailbox -OWAEnabled $false -PopEnabled $false -ImapEnabled $false -MAPIEnabled $false -ActiveSyncEnabled $false -EwsEnabled $false
Get-CASMailbox $member | Select-Object Name, OWAEnabled, PopEnabled, ImapEnabled, MAPIEnabled, ActiveSyncEnabled, EwsEnabled
==========================
Enable Access to Mailbox
#Set $member to username of the user you wan
$member | Set-CASMailbox -OWAEnabled $true -PopEnabled $true -ImapEnabled $true -MAPIEnabled $true -ActiveSyncEnabled $true -EwsEnabled $true
Get-CASMailbox $member | Select-Object Name, OWAEnabled, PopEnabled, ImapEnabled, MAPIEnabled, ActiveSyncEnabled, EwsEnabled
No comments:
Post a Comment