Could not find the group name. RRS feed

  • Question

  • HI,

    I executed the below VBS  file in Windows 7 Enterprise Edition workstation and received "Could not find the group name. Code :800708ac"

    GetObject("WinNT://" + WScript.CreateObject("WScript.Network").ComputerName + "/Administrators").Add"WinNT://MYDOMAIN/TEST-TESTWorkstationAdmins"

    I am able to add the "TEST-TESTWorkstationAdmins" in Administrator group manually but not able to add using the script.

    "TEST-TESTWorkstationAdmins" is Global Security Group. Please help me to fix the problem. 


    Boopathi S

    Wednesday, December 17, 2014 5:47 PM


  • The code in VBScript would look like this:

    Dim AdminGroup
    Set AdminGroup = GetObject("WinNT://" & CreateObject("WScript.Network").ComputerName & "/Administrators,Group")
    AdminGroup.Add "WinNT://MYDOMAIN/TEST-TESTWorkstationAdmins"

    But I would recommend using Group Policy to update local Administrators group membership rather than using a script.

    -- Bill Stewart [Bill_Stewart]

    Wednesday, December 17, 2014 6:07 PM