How to list all the services running with a service account in a server using Powershell

Question:

I want to update the password of all the services running under one account on multiple servers using powershell. i tried Get-process, Get-WMIObject cmdlets, but these two commands don’t have serviceaccount usage. is there a way to update password of all the services running with an account by passing service account,password as parameters to the script.

Answer:

To get list of services using a particular account you can do:

To change the password for these, you can do:

From here: http://www.send4help.net/change-remote-windows-service-credentials-password-powershel-495

Source:

How to list all the services running with a service account in a server using Powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply