Unable to run the Get-Service command in Powershell Ubuntu

Viewed 246

I installed Powershell in Ubuntu and when I try the

Get-Service

command, it returns an error :

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.

What am I doing wrong here? Is Get-Service a windows only command ?

Powershell version is PowerShell 7.1.0

1 Answers

As written in the official MS Docs, this commandlet is only available on windows ... Meaning it's not available for macOS nor ubuntu at the moment.

Related