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(' ') }
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
Post a Comment