Hi,
when this relatively simle script is executed remotely with SCCM or Altiris this script works fine. When executed as a stand-alone VBS it does not error out, but it does not add the AD group I want to local admins.
Option Explicit
Dim strComp, oGrp, oUsr
On Error Resume Next
strComp = "."
Set oGrp = GetObject("WinNT://" & strComp & "/Administrators")
Set oUsr = GetObject("WinNT://MYDOMAIN/ourtechs")
oGrp.Add(oUsr.ADsPath)
Thoughts or code revision suggestions appreciated.
when this relatively simle script is executed remotely with SCCM or Altiris this script works fine. When executed as a stand-alone VBS it does not error out, but it does not add the AD group I want to local admins.
Option Explicit
Dim strComp, oGrp, oUsr
On Error Resume Next
strComp = "."
Set oGrp = GetObject("WinNT://" & strComp & "/Administrators")
Set oUsr = GetObject("WinNT://MYDOMAIN/ourtechs")
oGrp.Add(oUsr.ADsPath)
Thoughts or code revision suggestions appreciated.