Quantcast
Channel: Exchange Server 2013 - Outlook, OWA, POP, and IMAP Clients forum
Viewing all articles
Browse latest Browse all 10580

Disable Imap and POP3 Script

$
0
0

Hello Everyone 

I am trying to make a script where I can disable Imap and POP3 for all new users in our organization. I have tried to use this command to disable new mailboxes. We are currently using Exchange 2007 SP3

Get-CASMailbox -ResultSize Unlimited | where {$_.ImapEnabled -eq $True or $_.PopEnabled -eq $True} | Set-CASMailbox -ImapEnabled $False -PopEnabled $False

but is seems to not like the "or" in this command. What am i doing wrong? And also is there a way to make possible to make the script look at the current date and disable Imap and POP3 for anyone that was created before the current date, and ignore everyone who's Imap and POP3 has already been disabled?

Thanks for any help


Viewing all articles
Browse latest Browse all 10580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>