Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 22
  • Last Modified:

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.
0
creative555
Asked:
creative555
  • 2
  • 2
1 Solution
 
Gary DewrellSenior Network AdministratorCommented:
0
 
creative555Author Commented:
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
0
 
Gary DewrellSenior Network AdministratorCommented:
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.
0
 
creative555Author Commented:
thank you so much!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now