Migration to Exchange 2010 fails with error "The term 'Get-OrganizationConfig' is not recognized
説明
Upon running a migration job the migration fails with errors in the log such as the example below:
20:34:37 AdFwd::Init() - PowerShell Result: The term Get-OrganizationConfig is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
原因
Exchange 2010 only allows Exchange admin tools to be installed on Exchange servers, so connections need to be made from the NME console to Exchange & commands executed remotely via PowerShell.
When a session is established within PowerShell with the remote Exchange server, commands are downloaded locally but only those commands to which the user has permissions.
The tool tests connectivity via the users logged-in account before carrying out further actions using the credentials specified under the "Active Directory" settings in the console. Therefore if there are insufficient permissions to access these PowerShell commands for either this service account or the logged-on account (if different), then the migration will fail with the above error.
対策
Apply suitable permissions.
It has been found in some scenarios that adding the relevant account(s) to the built-in "Exchange View-Only Administrators" group resolved the issue.
追加情報
The following test can be useful to confirm where the issue lies. These commands should be run from the consoles PowerShell.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://FQDNOFEXCHANGE/Powershell/ -Authentication Kerberos (creates session to Exchange server, specify the relevant Exchange server FQDN in place of FQDNOFEXCHANGE)
Import-PSSession $Session (imports the session, making available the PowerShell commands to which the user has access)
Get-OrganizationConfig (this is the command which failed, detailed in the error above)
If any of these commands fail then there is a permissions issue.