Para deshabilitar y habilitar POP e IMAP para todos los usuarios y usuario individual de Office 365, siga estos pasos:
1. Conectarse a Exchange Online:
Nos conectamos con derechos de Administrador.
$Credential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri «https://ps.outlook.com/powershell» -Credential $Credential -Authentication Basic -AllowRedirection
$ImportResults = Import-PSSession $Session
2. Desactivar todos los buzones de usuarios de POP e IMAP:
$Mailboxes = Get-Mailbox -ResultSize Unlimited
ForEach ($Mailbox in $Mailboxes) {$Mailbox | Set-CASMailbox -PopEnabled $False -ImapEnabled $False }
Si queremos volver activar solo reemplazamos $False por $True .
$Mailboxes = Get-Mailbox -ResultSize Unlimited
ForEach ($Mailbox in $Mailboxes) {$Mailbox | Set-CASMailbox –PopEnabled $True –ImapEnable $True }
Si solamente queremos desactivar cuenta individual.
$Mailbox = Get-Mailbox -Identity «jcastaneda» -ResultSize Unlimited
ForEach ($Mailbox in $Mailbox) {$Mailbox | Set-CASMailbox -PopEnabled $False -ImapEnabled $False }
$Mailbox = Get-Mailbox -Identity «jcastaneda» -ResultSize Unlimited
ForEach ($Mailbox in $Mailbox) {$Mailbox | Set-CASMailbox -PopEnabled $True -ImapEnabled $True }
3. Cierre la sesión en línea de Exchange:
Remove-PSSession $Session
Pingback: Deshabilitar POP e IMAP en Office 365 « MSExpertos