When trying to run the Get-ExchangeServer cmdlet in PowerShell, you may get this error:
The term ‘Get-ExchangeServer’ is not recognized as the name of a cmdlet, functi
on, script file, or operable program. Check the spelling of the name, or if a p
ath was included, verify that the path is correct and try again.
At line:1 char:19
+ Get-ExchangeServer <<<< ServerNamer | Format-List Name,Domain,Site,fqdn,Serve
+ CategoryInfo : ObjectNotFound: (Get-ExchangeServer:String) ,
+ FullyQualifiedErrorId : CommandNotFoundException
Get-ExchangeServer is not recognised by PowerShell because it’s not being run in an “Exchange PowerShell”.
To fix this, open a command prompt on the exchange server and run this: