Forum Discussion
McSnert
May 29, 2020Copper Contributor
Services Log On As search
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?
Thanks.
- AndySvintsSteel Contributor
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.