An error occurred while performing the relevant exchange commands in Exchange PowerShell. No available global catalogs were found in the forest
This error will be reported regardless of any command executed, as follows
First, by detecting that the current site DC is working correctly. Then, in order to force Exchange Server to re-detect Active Directory Sites and service topologies,
After restarting the Microsoft Exchange Active directory Topology Service service on the Exchange server, the failure remains unresolved.
Follow-up discovery to execute ad-related commands is no problem, except that executing Exchange commands will error
Finally, consider whether there is a problem with IIS because the Exchange shell commands are invoked through IIS. Finally, the IIS is restarted,
Problem solved after reboot
Exchange PowerShell error failed to find any available global catalogs in the forest