Forum Discussion
Marvin Oco
Oct 07, 2019Iron Contributor
Using powershell to disable O365 POP and IMAP from a user CSV list
How to use powershell to disable O365 POP and IMAP from a user CSV list?
thanks
2 Replies
- Kevin_MorganIron Contributor
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 } - ArjanCornelissenBrass Contributor
Marvin Oco You can use the Set-CASMailbox -Identity <UPN> -PopEnabled $false -ImapEnabled $false