How to Fix the Get-OrganizationConfig is not Recognized Error?
Summary: In a hybrid setup when you run the Hybrid Configuration Wizard, you may encounter the Get-OrganizationConfig is not recognized error. In this post, we’ll discuss this error in detail and see how to fix this error. We’ll also mention an EDB converter software that can directly migrate data from EDB file to Office 365 without any issue.
When it comes to migration from on-premises Exchange to Office 365, there are multiple ways to migrate the data and services. One of them is to create a hybrid setup where both on-premises Exchange Server and Exchange Online work as one until the migration of data is complete. Sometimes, while running the Hybrid Configuration Wizard, you receive the “”Get-OrganizationConfig is not recognized“ or “Please verify you have the correct Management Role assigned to your account” error message.
Below, we’ll go through the Get-OrganizationConfig is not recognized error and see how to troubleshoot the issue.
How the Issue Occurs?
When having a hybrid setup, it is assumed that the Hybrid Configuration application is installed. With the Hybrid Configuration Wizard, we can verify that the role is assigned. At the welcome screen, we can specify the local and Exchange Online users. It will test the connectivity and check the proper permissions. However, we found that it is successfully connected to on-premises Exchange but failed to connect to Office 365 (see below).
We can check the Exchange Hybrid Configuration logs to verify the error and get more details on the issue. The log files can be found at the following location:
%UserProfile%\AppData\Roaming\Microsoft\Exchange Hybrid Configuration
We will probably see the error as given below.
*ERROR* [Client=UX, Activity=Tenant Connection Validation, Session=Tenant, Cmdlet=Get-OrganizationConfig, Thread=11] FINISH Time=700,0ms Results=Command not recognized. Please verify you have the correct Management Role assigned to your account.
*ERROR* [Client=UX, Activity=Tenant Connection Validation, Thread=11] Command not recognized. Please verify you have the correct Management Role assigned to your account.
The error message indicates that there is an issue with the role on the account we are running. To confirm this, open the Exchange Online PowerShell, run the command Connect-ExchangeOnline, and login with the same credentials specified in the Hybrid wizard. Now run the Get-OrganizationConfig command. In this case, we will get the reply saying:
Get-OrganizationConfig : 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.At line:1 char:1
+ Get-OrganizationConfig
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-OrganizationConfig:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How to Resolve the Issue?
First, we need to confirm that we have the right role assigned. For this, we can use the Roles section in the Microsoft 365 Admin Center. We need to confirm or assign the Compliance Management role to the user. After signing in the portal, perform these steps:
- Expand Roles and click on Role Assignments.
- Under Roles Assignments, click on Exchange.
- Click on Compliance Management.
- In the new pane that opens, click on Assigned.
- Make sure that the user we’re using in the Hybrid Configuration Wizard is in the members list. If not, click on the Add button to add the user and click on Save.
Note: The changes might take 1 hour to be populated in the tenant and to take effect.
Once this is complete, we can re-run the command. Before running the command on the Exchange Online PowerShell, we need to disconnect by using the Disconnect-ExchangeOnline and then re-connect. After running the Get-OrganizationConfig command, we get the output. This can be confirmed in the Office 365 Hybrid Configuration Wizard. We should have the following message showing succeeded.
Conclusion
The hybrid method involves a lot of configurations. There are a lot of failing points, which would degrade or even disrupt the migration. We need to also ensure that the on-premises server is connected to the internet with all the ports open, certificates from certified certificate authority, and all the elements are working fine. If this is not the case, we need to find other options to migrate the data.
One such option is to use an EDB to PST application such as Stellar Converter for EDB. The application can help migrate the data with minimal effort and resources. Stellar Converter for EDB can easily open the EDB files and export the data directly to Office 365. It offers features such as automatic mailbox matching, parallel export, priority exports, and continuation in case of interruption. It is not limited to exporting mailboxes only but can also export archives, shared mailboxes, disabled mailboxes, and public folders.