#109485 - 2003-12-03 04:55 PM
Re: Add user to a local SAM database
|
mima
Hey THIS is FUN
Registered: 2002-01-25
Posts: 217
Loc: Jönköping, Sweden
|
Sorry. Wrong DNS in the workstation that I tested with, not to the Active Directory DNS. that gave all the errors....
 So now the script works perfect. Here is the code to all if you want to ADD a group from the Domain into a Local group on a workstation:
Dim $iRC $iRC=SetOption('Explicit','On') $iRC=SetOption('NoVarsInStrings','On') Dim $Computer,$Group,$User $Domain = "MyDOM" $Computer = "ws001" $Group = GetObject("WinNT://" + $Computer + "/Administrators,group") $Group.Add("WinNT://$Domain/Domain Users")
/Mima
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 878 anonymous users online.
|
|
|