Pyralix
Pyralix

Reputation: 41

List running processes without an image path name using powershell

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.

Upvotes: 1

Views: 559

Answers (1)

TheMadTechnician
TheMadTechnician

Reputation: 36297

Check for null or blank:

Get-Process | ?{[string]::IsNullOrWhiteSpace($_.Path)}

Upvotes: 1

Related Questions