Hi,
If you would like to add local user to Domain group, as far as I know, we cannot do that.
If you would like to add local user to a local user group, you can try the following script.
UserName="NAME"
strComputer="COMPUTERNAME"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
Set objUser = GetObject("WinNT://" & UserName)
objGroup.Add(objUser.ADsPath)
Thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
-
Marked as answer by
Mervyn Zhang
Friday, February 13, 2009 6:18 AM