User Tools

Site Tools


windows:server_os:add_long_ad_grp_to_local_grp

Add AD group with long name as local group member

When you try to add an Active Directory group with name longer than 25 characters (in total), net.exe command will not work; but you can use the following VB script instead

Set objLocalGroup = GetObject("WinNT://./Administrators")
Set objADGroup1 = GetObject("WinNT://DOMAINNAME/DOMAINGROUPNAME")
objLocalGroup.Add(objADGroup1.ADsPath)
Set objLocalGroup = Nothing
Set objADGroup = Nothing
windows/server_os/add_long_ad_grp_to_local_grp.txt · Last modified: 2017/08/10 11:00 (external edit)