Created
January 3, 2017 06:19
-
-
Save nitincoded/4965006a6a6f734aa4c6332875f66e2b to your computer and use it in GitHub Desktop.
PowerShell script for new user and mailbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$newuserpass=ConvertTo-SecureString "ablublah" -AsPlainText -Force | |
New-ADUser -Name "fname.lname" -GivenName "fname" -Surname "lname" -DisplayName "fname lname" -AccountPassword $newuserpass -Path "OU=subgroup,DC=dcname,DC=dcupname" -Enabled 1 | |
#On Exchange Server | |
Enable-Mailbox -Identity fname.lname -Database MBOX01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment