PowerShell on Mac: The term get-service is not recognized as a name of a cmdlet, function, script file, or executable program


Error:
PS /Users/c2ctech> get-service

get-service: The term 'get-service' is not recognized 
as a name of a cmdlet, function, script file, or executable program.

Check the spelling of the name, or if a path was included, 
verify that the path is correct and try again.

If you are using PowerShell on a Mac running on macOS and you try to make use of the Get-Service or any *-Service commands, you will get an error saying it is not recognized, that is because this cmdlet only supports Windows Operating Systems and not PowerShell for macOS.

Get-Service PowerShell Command Not Recognized on macOS

Alternatively you can try running the below command.

Get-Command -CommandType Cmdlet

Other options: Alias, Application, Configuration, Filter, Script, All, Cmdlet, ExternalScript, and Function.

-




Have Questions? Post them here!