How to quickly create 30 exchange mailboxes for testing with powershell for Exchange 2016
CLS
1..30 | % {
$Path = "OU=LAB,OU=STUDENT,OU=USERS,OU=company,DC=domain,DC=com"
$Name = "Student" + $_
$UPN = $Name + "@domain.com"
New-Mailbox -UserPrincipalName $UPN `
-Alias $Name `
-Database DB01 `
-Name $Name `
-OrganizationalUnit $Path `
-Password (ConvertTo-SecureString -AsPlainText 'password' -Force) `
-FirstName Student `
-LastName $_ `
-DisplayName $Name `
-ResetPasswordOnNextLogon $false
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.