Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

How can I create a new mailbox with "EmailAddressPolicyEnabled" attribute of the mailbox set to $false when the newly created AD account has no SMTP address?

$
0
0

This is a tow step process for us:

1- The AD account is first created - but there is no SMTP address created at this time

2- I then need to enable-mailbox for that new user - but I don't want the EmailAddressPolicyEnabled attribute of the mailbox set to $True. How can I modify my script to accomplish that?

Here is what I have:

$mailbox=import-csv C:\Downloads\NewUser.CSV
ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database -ManagedFolderMailboxPolicy "90 day policy" -ManagedFolderMailboxPolicyAllowed}
Set-CASMailbox -Identity $mailbox.Identity -ActiveSyncEnabled:$false -POPEnabled:$false -OWAEnabled:$false -IMAPEnabled:$false


ExchangeGuru


Viewing all articles
Browse latest Browse all 2562

Trending Articles



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