techdrive
asked on
Exchange 2010 powershell script enabling account services automatically
I used this script below to create exchange users from existing AD accounts. It does it well except for the fact that it enables OWA and pop3. Any reason why this automatically does this without me even specifying to do so. When I create an account by hand this does not happen.
$mailbox=import-csv C:\temp\mailusers.CSV
ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database | Enable-Mailbox –Archive -ArchiveDatabase $Mailbox.Database}
$mailbox=import-csv C:\temp\mailusers.CSV
ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database | Enable-Mailbox –Archive -ArchiveDatabase $Mailbox.Database}
OWA, ActiveSync, and POP3 are enabled by default. You should be able to update your script to disable it if you don't want it. But you would have to explicitly tell it you want to disable it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If you have POP3 service disabled why would it automatically enable POP3 accounts.
By default POP3 and IMAP enabled in mailboxes.
untill you start the IMAP and POP3 services in CAS server, users cannot connect to mailbox using POP3 & IMAP.
The below link would help you to understand more,
http://technet.microsoft.com/en-us/library/bb124107(v=exchg.141).aspx
untill you start the IMAP and POP3 services in CAS server, users cannot connect to mailbox using POP3 & IMAP.
The below link would help you to understand more,
http://technet.microsoft.com/en-us/library/bb124107(v=exchg.141).aspx
If you have POP3 service disabled why would it automatically enable POP3 accounts.Even if the user account is pop3 enabled (which is by design) the user won’t be able to access the mailbox using pop3 protocol unless you enable the service on server.
ASKER
Thanks for all the helpful info guys
ASKER
Any alternatives to disable pop3 from being enabled on the users account when it is created.
I don't think you could disable POP3 and IMAP while creating mailbox.
But you could use template to create mailbox..
http://www.petri.co.il/using-templates-to-create-exchange-recipient-objects-part-1.htm
you need to add the below cmdlet while creating templates.
[add set-casmailbox -ActiveSyncEnabled $false -PopEnabled $false -ImapEnabled $false ]
Also the below link would help you to find other way,
http://social.technet.microsoft.com/Forums/exchange/en-US/ed59af64-6287-421a-ada8-c221d3a4bcc5/disable-pop3imapactivesync-globally-in-exchange-2010
But you could use template to create mailbox..
http://www.petri.co.il/using-templates-to-create-exchange-recipient-objects-part-1.htm
you need to add the below cmdlet while creating templates.
[add set-casmailbox -ActiveSyncEnabled $false -PopEnabled $false -ImapEnabled $false ]
Also the below link would help you to find other way,
http://social.technet.microsoft.com/Forums/exchange/en-US/ed59af64-6287-421a-ada8-c221d3a4bcc5/disable-pop3imapactivesync-globally-in-exchange-2010
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.