Strange thing how Exchange will work and after a reboot you cannot run any commands.

In my previous post where we recovered the Exchange Security groups, all seemed fine until commands were run the Exchange Management Shell.

The famous error “The term ‘command’ was given for the simplest command “get-queue”:

Exchange 2019 - powershell commands not recognized
Exchange 2019 - PowerShell Commands not recognized 1

I went and checked and my account was an organisation admin, I could not even check the role group or the database availability group. To fix* this you need to run the following command (if on Exchange 2010, change V15 to V14)

  • C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile “C:\Program Files\Microsoft\Exchange Server\v15\bin\exshell.psc1” -noexit -command “. ‘C:\Program Files\Microsoft\Exchange Server\v15\bin\Exchange.ps1’”
Exchange 2019 - powershell commands not recognized
Exchange 2019 - PowerShell Commands not recognized 2

It basically re-launches the EMS inside itself but the fix only works in that current session, after you close and open it then it does not work again.

Hope it helps.

Discover more from COLLABORATION PRO

Subscribe now to keep reading and get access to the full archive.

Continue reading