Link to home
Start Free TrialLog in
Avatar of creative555
creative555

asked on

powershell script to setup logon service account on multiple servers

Hello,
Do you have a script or command line to specific logon account name for the specific service on multiple computers

For example,
the service name called "xyz" and I need to set up logon account svc_appadmin to run this service.

thank you so much for your help in advance.
ASKER CERTIFIED SOLUTION
Avatar of Gary Dewrell
Gary Dewrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of creative555
creative555

ASKER

hm. Isn't it the old way to do it using win32?
How about using powershell remoting so that I can update it on all computers from one computer?

something like this using psremoting:
invoke-command -computer pc01, pc02, pc03 {get-service -name servicename} etc.

I have powershell remoting enabled and all computers are running 2012.

Please help
If you were only getting the service information or setting  those properties that can be set using the set-service cmdlet then yes you would be correct. Unfortunately the set-service cmdlet does not allow you to set the logon account or password.
thank you so much!