#powershell Select-Object -ExcludeProperty

The ExcludeProperty parameter in Select-Object must always be used together with the Property parameter as illustrated:

gsv | Select-Object -ExcludeProperty status -first 1 | select s*

ServiceName : AJRouter
ServicesDependedOn : {}
ServiceHandle : SafeServiceHandle
Status : Stopped
ServiceType : Win32ShareProcess
StartType : Manual
Site :

gsv | Select-Object -ExcludeProperty status -Property s* -first 1 | select s*

ServiceName : AJRouter
ServicesDependedOn : {}
ServiceHandle : SafeServiceHandle
ServiceType : Win32ShareProcess
StartType : Manual
Site :

Leave a Reply