Modify a Service Account Password

Changes the service account password for any services running under the Netsvc account.

Add to favorites
Operating System
E-mail Twitter Digg Facebook
  • Service password change
    1 Posts | Last post August 30, 2010
    • The script to change the password for a running service does not seem to work. 
      strComputer = "."
      Set objWMIService = GetObject("winmgmts:" _
          & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
      Set colServiceList = objWMIService.ExecQuery _
          ("Select * from Win32_Service Where StartName = '.\\netsvc'")
      For Each objService in colServiceList
          errReturn = objService.Change( , , , , , , , "password")  
      In the above code what is netsvc? Is this the name of the service ot the service account logon name? I have tried both. It does not work. Can someone Clarify or help me?