Is it at all possible to create a powershell script that will update a local service's Log On As credentials?
I need to create a script that will do 3 things:
1) Change a local service accounts log on as credentials
2) Change a AD user accounts password
3) Restart a service on a local machine
Any help would be appreciated.
Change Service Credentials and More..
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Change Service Credentials and More..
Is it at all possible to create a powershell script that will update a local service's Log On As credentials?
I need to create a script that will do 3 things:
1) Change a local service accounts log on as credentials
2) Change a AD user accounts password
3) Restart a service on a local machine
Any help would be appreciated.
I need to create a script that will do 3 things:
1) Change a local service accounts log on as credentials
2) Change a AD user accounts password
3) Restart a service on a local machine
Any help would be appreciated.
Change Service Credentials and More..
Sure. You'll need to use Get-WMIObject to change the service account. The StartName property is the service account. To change an AD user account password, the easiest solution is to use the Set-QADUser cmdlet from Quest. Otherwise you can do it using ADSI. To restart a local service use the Restart-Service cmdlet.
Change Service Credentials and More..
I'm not sure I follow. You don't have access to an account but you can impersonate it? You still need to know the username and password for the impersonation so this doesn't make sense to me. All ADSI needs is a secure connection to the remote machine which you can do by mapping a drive to it using alternate credentials:net use z: server01admin$ /user:mydomainadmin P@ssw0rdCan you do something like that?