Hi
I got interesting question
lets say I have 700 test users/mailboxes
that I want to load balance across 175 databases
how would I got about doing that?
for example I have this part nailed down:
Import-Csv c:\temp\out.csv | ForEach-Object { New-ADuser -path ‘OU=OU1,DC=test,DC=corp’ -Name $.samAccountName -samAccountName $.samAccountName –userPrincipalName $.userPrincipalName -GivenName $.cn -Surname $.sn -displayName $.displayName -accountpassword (ConvertTo-SecureString $.Password -AsPlainText -Force) -Enabled $true}
[array]$databases=1…175 | % { “DB{0:000}” -f $ }
this part is where I’m stuck:
Enable mailboxes
Get-User -OrganizationalUnit ‘OU=OU1,DC=test,DC=corp’ -Filter ‘RecipientType -eq “user”’ | ForEach-Object { $email = $.FirstName +“.”+ $.LastName +“@evo960.info”; Enable-Mailbox -Identity $.SamAccountName -DisplayName $.DisplayName -Alias $_.SamAccountName -PrimarySmtpAddress $email -Database ???}
basically need to loop through $databases more then once(cause I got 175 and 700 users)
Thanks