HighTechTalks DotNet Forums  

Reset service username and password remotely with a script?

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Reset service username and password remotely with a script? in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jason
 
Posts: n/a

Default Reset service username and password remotely with a script? - 01-10-2005 , 03:44 PM






Is it possible to reset a Windows Service username and password remotely
(ie. from a workstation) with any sort of script? If so, could someone
please point me in the direction of some documentation?

Thanks in advance,

Jason



Reply With Quote
  #2  
Old   
Thiruppathi S
 
Posts: n/a

Default Re: Reset service username and password remotely with a script? - 01-21-2005 , 08:15 AM






Hi Jason,

You Could Try this

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")
Next

Rgds,
Thiruppathi S

"Jason" <jason (AT) grossmans (DOT) net> wrote

Quote:
Is it possible to reset a Windows Service username and password remotely
(ie. from a workstation) with any sort of script? If so, could someone
please point me in the direction of some documentation?

Thanks in advance,

Jason





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.