L
L
lorik3402020-10-30 10:56:07
PowerShell
lorik340, 2020-10-30 10:56:07

Listing running processes and their associated services in Powershell?

I use this script
Get-WmiObject Win32_Service | Where-Object ProcessId -In (Get-Process svc*).Id | sort-object proc* | Format-Table proc*, stat*, name*

Please help me how to display everything as a HashTable.
I tried this way, but I still can't display the process:

Get-WmiObject Win32_Service | Where-Object ProcessId -In (Get-Process svc*).Id | sort-object proc* | Group proccesId, state, name -AsHashTable -AsString

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2020-10-30
@lorik340

Something tells me that in the last version the word processId should not be written as proccesId
But the questions from the comment still remain

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question