Guys,
This script basically takes input from a file with the two fields populated as such below. It then creates the user on the specified mailboxdatabase under the column. This is for an exchange 2010 environment. My challenge that I have is actually getting the archive database to be the same as the mailboxdatabase. How do I incorporate this in the script I have below many thanks
user, mailboxdatabase
user1 mbb00
user3 mbb5
user20 mbb6
$mailbox=import-csv C:\temp\mailusers.CSV
ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database | Enable-Mailbox –Archive -ArchiveDatabase "samedatabase"}
ForEach ($mailbox in $mailboxes)
{
Enable-Mailbox -Identity $mailbox.user -Database $mailbox.mailboxdatabase –Archive -ArchiveDatabase $mailbox.mailboxdatabase
}