Under powershell >= 5.1
I get:
PS C:> get-service -Status Running
Get-Service: A parameter cannot be found that matches parameter name 'Status'
But the property does exist anyway ?
PS C:> get-service | Get-Member
2
PowerShell is designed to handle problems like this through composition – if Get-Service
returns objects with a Status
property that you want to filter on, simply compose a new pipeline by adding the Where-Object
cmdlet downstream:
Get-Service |Where-Object Status -eq Running