Reputation: 47
As question how to get name of process in background process with powershell script? How to find whether inside background process of the task manager can find the certain app name or not? For example in the image below, i need to check whether have this item in background process "NetOp 32 Host Application. (32 bit)"
Upvotes: 1
Views: 2872
Reputation: 819
Task Manager shows FileDescription. You can game the same like that:
Get-Process | select @{Name='Name'; Expression={$_.MainModule.FileVersionInfo.FileDescription}}
It is possible to filter the result:
Get-Process | select @{Name='Name'; Expression={$_.MainModule.FileVersionInfo.FileDescription}} |? Name -match 'Visual'
My filtered results looks like:
Name
----
Microsoft Visual Studio 2019 Preview
Microsoft Visual Studio 2019 Preview
To check how many results you have, you can use Count
property:
$filteredResults = Get-Process | select @{Name='Name'; Expression={$_.MainModule.FileVersionInfo.FileDescription}} |? Name -match 'Visual'
$filteredResults.Count
Upvotes: 2