powershell

sethayes

·

Get-ServiceAccount_PS

·

Powershell

·

Total Size: 448 B

·

·

Created: 6 years ago

·

Edited: 6 years ago

$uns = ".*administrator.*|.*admin.*" Get-WmiObject Win32_Service | Where {($_.StartName -match $uns) -or ($_.StartName -eq "msi\msi")} | Select Name,StartName

This can be modified to included multiple names.  It will then find all services running under one of those account names, and return the name of the service along with which account it's running under.

Need to test for accuracy before modifying it to run domain-wide.

1 bit

372 views

Are you sure you want to delete?