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.
PowershellScripting Languages

Avatar of undefined
Last Comment
creative555
ASKER CERTIFIED SOLUTION
Avatar of Gary Dewrell
Gary Dewrell
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
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
Avatar of Gary Dewrell
Gary Dewrell
Flag of United States of America image

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.
Avatar of creative555
creative555

ASKER

thank you so much!
Scripting Languages
Scripting Languages

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

30K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo