Re: Script for adding/removing local user accounts on servers by srikanth
srikanth
Tue Mar 14 11:01:30 CST 2006
Hi,
This is Srikanth, i am working with HSBC. India, the below script would
meet your requirments.
1.Creating local User Accout
strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer & "")
Set objUser = colAccounts.Create("user", "Admin2")
objUser.SetPassword "test"
objUser.SetInfo
2.Deleting User Account
strComputer = "MyComputer"
strUser = "Admin2"
Set objComputer = GetObject("WinNT://" & strComputer & "")
objComputer.Delete "user", strUser
brudertl wrote:
> Hello,
>
> I have a need to maintain exact copies of local user accounts between
> two Win2k3 member servers. I cannot use AD; the accounts must be
> local.
>
> I'm looking for a script that will create/delete user accounts on both
> servers. In addition, when a PW needs to be updated it will change it
> on both servers.
>
> I'm vbScript "savvy" so I'm looking for a good headstart if someone
> else is doing something like this already.
>
> Thanks!
> Troy