Domanda

I am trying to use powershell to list only processes on our server that do not have an image path name using powershell. Currently I have (get-process).path but this only returns processes with a path name. Assistance is much appreciated, thanks.

È stato utile?

Soluzione

Check for null or blank:

Get-Process | ?{[string]::IsNullOrWhiteSpace($_.Path)}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top