Hello all,
I'm a super rookie with Power Shell and would appreciate a little assistance. I have a script that will create mailboxes from a CSV file and it works fine but there are a few things I don't know how to apply when creating the accounts.
1. Applying my GPO to OWA in Mailbox Features
2. Selecting the mailbox DB the user will be placed in.
This is what I have so far:
Import-Csv c:\Scripts\Myfile.csv | ForEach-Object {
$password = ConvertTo-SecureString $_.Password -AsPlainText -Force
New-Mailbox -Name $_.Name `
-FirstName $_.FirstName `
-LastName $_.LastName `
-Alias $_.SamAccountName `
-UserPrincipalName $_.UserPrincipalName `
-Password $password `
-ResetPasswordOnNextlogon $False `
-OrganizationalUnit mydomain.com/Users
}
Any help would be appreciated. Thanks!