disturbedone
Vendor
Hi, I'm relatively new to Powershell. A script was written by a contractor to add an AD user & mailbox in our Exchange 2007 environment. We upgraded to 2010 recently and now the script causes a problem.
Having extracted the single line in the script that adds the user/mailbox I've found it is the cause. The script itself generates an error on a later command but that's because the mailbox was not created properly initially.
The command is as follows. Obviously things like $FULLNAME are inputted by the user during the script.
New-Mailbox -Name $FULLNAME -Alias $LOGONALIAS -OrganizationalUnit "grammar.local/CGS/USERS/STAFF" -UserPrincipalName $LOGONALIAS@grammar.local -SamAccountName $LOGONALIAS -FirstName $FIRST -LastName $LAST -Password $PASSWORD -ResetPasswordOnNextLogon $true -Database "CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=EXMS,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local"
It does create the AD user and in the Exchange console I can see the user too. But the problem arises when I right-click and select to Manage Full Access Permissions. It then gives the error "Exchange Information Store on server 'exms.abc.local' is inaccessible. Make sure that the network is connected and that the Exchange Information Store is running. It was running the command 'Get-MailboxPermission -Identity 'CN=JohnSmith,OU=Staff,OU=Users,OU=School,DC=abc,DC=local''
In digging further using ADSI Edit I compared a working user and the test one I created. The 'HomeMDB' and 'HomeMTA' were different. The command above enters "CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=EXMS,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local" in the 'HomeMDB' field. The equivalent field in a working user is
"CN=2010 DAG Cluster,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local" so I put that in the command but get told that the 'Database 2010 DAG Cluster' was not found. Please make sure you have typed it correctly. Reason: ?The server '2010 DAG Cluster' is running Microsoft Exchange 2003 or earlier'.
What should this Powershell command include?
Having extracted the single line in the script that adds the user/mailbox I've found it is the cause. The script itself generates an error on a later command but that's because the mailbox was not created properly initially.
The command is as follows. Obviously things like $FULLNAME are inputted by the user during the script.
New-Mailbox -Name $FULLNAME -Alias $LOGONALIAS -OrganizationalUnit "grammar.local/CGS/USERS/STAFF" -UserPrincipalName $LOGONALIAS@grammar.local -SamAccountName $LOGONALIAS -FirstName $FIRST -LastName $LAST -Password $PASSWORD -ResetPasswordOnNextLogon $true -Database "CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=EXMS,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local"
It does create the AD user and in the Exchange console I can see the user too. But the problem arises when I right-click and select to Manage Full Access Permissions. It then gives the error "Exchange Information Store on server 'exms.abc.local' is inaccessible. Make sure that the network is connected and that the Exchange Information Store is running. It was running the command 'Get-MailboxPermission -Identity 'CN=JohnSmith,OU=Staff,OU=Users,OU=School,DC=abc,DC=local''
In digging further using ADSI Edit I compared a working user and the test one I created. The 'HomeMDB' and 'HomeMTA' were different. The command above enters "CN=Mailbox Database,CN=First Storage Group,CN=InformationStore,CN=EXMS,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local" in the 'HomeMDB' field. The equivalent field in a working user is
"CN=2010 DAG Cluster,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=ABC School,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abc,DC=local" so I put that in the command but get told that the 'Database 2010 DAG Cluster' was not found. Please make sure you have typed it correctly. Reason: ?The server '2010 DAG Cluster' is running Microsoft Exchange 2003 or earlier'.
What should this Powershell command include?