Get-WMIObject Service finding unquoted path

Get-WmiObject -Class Win32_Service -ComputerName INSKUMAR02 |
select-object PSComputerName,Name,PathName,startMode  | where-object {$_.startMode -eq "Auto" -and $($_.PathName).Substring(0,1) -ne '"' -and $($_.PathName).Substring(0,$($_.PathName).LastIndexOf("\") + 1).Contains(' ') }

Comments

Popular posts from this blog

Enterprise CA option is greyed out / unavailable

Rearm the Office 2013 installation

MP has rejected registration request due to failure in client certificate