G
Guest
Hi,
Moving forward with AD I am learning that I require the WMI skill to take
full advantage of GPO's.
I would like my script to Add a specified group to the pc's Local Admin
account.
My script won't run and has no form on debugging.
I modified the script to suite my requirements.
Pls can someone check it out and provide some input
Thanx in advance ,
Julian
'Beginning Of the Script
On Error Resume Next
'get main objects/variables
Set ws = WScript.CreateObject ( "WScript.Shell" )
compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
Set adGrp = GetObject ( "WinNT://" & compname & "/Administrators,group" )
'add domain groups to local admin group
adGrp.Add ( "WinNT://coronation/Desktop Admins,group" )
'End of the Script
Moving forward with AD I am learning that I require the WMI skill to take
full advantage of GPO's.
I would like my script to Add a specified group to the pc's Local Admin
account.
My script won't run and has no form on debugging.
I modified the script to suite my requirements.
Pls can someone check it out and provide some input
Thanx in advance ,
Julian
'Beginning Of the Script
On Error Resume Next
'get main objects/variables
Set ws = WScript.CreateObject ( "WScript.Shell" )
compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
Set adGrp = GetObject ( "WinNT://" & compname & "/Administrators,group" )
'add domain groups to local admin group
adGrp.Add ( "WinNT://coronation/Desktop Admins,group" )
'End of the Script