Oct 06 2019 06:45 PM - edited Oct 06 2019 07:16 PM
How to use powershell to disable O365 POP and IMAP from a user CSV list?
thanks
Oct 07 2019 03:52 AM
@Marvin Oco You can use the Set-CASMailbox -Identity <UPN> -PopEnabled $false -ImapEnabled $false
Oct 08 2019 01:06 AM
Consider the CSV file "Users.csv" which contains username (or upn) of users with the column header UserPrincipalName and try the below commands.
Import-Csv 'C:\Users.csv' | ForEach-Object { Set-CASMailbox -Identity $_."UserPrincipalName" -PopEnabled $false -ImapEnabled $false }