Jump to content

Script for changing user&password for service


hysel

Recommended Posts

hi all

i am going to be in charge of upgrading 5000 workstations in in one of the biggest cell phone company in israel.

i need a script that change the user and password for the NOVEL NAL service.

the service will runas this username: zenservice@pelephone.co.il

i have a registry key the change the runas option for the service to zenservice@pelephone.co.il

but i need a script the also define the password for this user.

can anyone help me please?

10x in advance

Link to comment
Share on other sites


well....

i got it have a look:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service")
For Each objservice in colServiceList
If objService.Startname = ".\Your User name Here" Then
errReturn = objService.Change( , , , , , , , "Your Password Here")  
End If
Next

helped myself :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...