Jump to content

Script for changing user&password for service


Recommended Posts

Posted

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


Posted

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 :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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