Services Log On As search

Copper Contributor

I am trying to craft a PS script that will search designated domain joined servers for running services that are designated with a specific 'Log on As' account and list them by server and service. I am completely lost on this. Can anyone make some suggestions or point me in the right direction on this?


1 Reply

Hello @McSnert,


You can get this info from win32_service object.

Get-CimInstance win32_service | select name,startname,startmode


Reference: PowerShell to Find Service Accounts 


Hope that helps.