Power Shell does not like command

Posted by Campo on Server Fault See other posts from Server Fault or by Campo
Published on 2010-06-16T15:43:41Z Indexed on 2010/06/16 15:53 UTC
Read the original article Hit count: 223

Any ideas what I did wrong here? I copied this script from a tutorial and get this error....

PS C:\Windows\system32> Get-Service | Where-Object ($_.status -eq "running")

Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert value "False" to type "System.Management.Automation
.ScriptBlock". Error: "Invalid cast from 'System.Boolean' to 'System.Management.Automation.ScriptBlock'."
At line:1 char:27
+ Get-Service | Where-Object <<<<  ($_.status -eq "running")
    + CategoryInfo          : InvalidArgument: (:) [Where-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand

© Server Fault or respective owner

Related posts about windows-7

Related posts about command-line