Get ServiceAccount Name with ADSI
Tuesday, March 31st, 2009 by Jeffery Hicks
One drawback to the service objects returned from Get-Service is that you can't see what account the service is running under, often referred to as the service account. This will be something like LocalService or perhaps even a special user account like Mydomain\svcAccount123. You can retrieve this information by querying Windows Management Instrumentation (WMI) and the Win32_Service class. But did you know you can also use ADSI?   More »