Link to home
Create AccountLog in
Avatar of Mandy_
Mandy_

asked on

Powershell calculate number between 1 and 50 to use variable exchange databases

Hi,

i like to enable mbx of a lot of user from a CSV but i want to use different databases between
DB0001 and DB0050. How can i create this to use with following cmd-

Enable-Mailbox -Identity $User.UserID -Database DB0001

appreciate for your help
mandy
SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Incidentally, if you don't specify a database when creating a mailbox,
exchange will load balance the mailboxes across all available databases automatically.

Depending on your setup, this may be redundant code.
@Mandy_, May I ask you the reason you selected Sedgwick's commend as answer? In fact, I did provide the method to get random numbers. Sedgwick just elaborated it using same method. A split in points would be more fair.. :-)
I agree points should be splited