Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Add All the Users from an Existing Active Directory Group to a New GroupContent of Add All the Users from an Existing Active Directory Group to a New Group.vbsMD5 Hash: 416AEC7888FE6F47388377730BADAB98 |
||
Const ADS_GROUP_TYPE_GLOBAL_GROUP = &H2
Set objOU = GetObject("LDAP://OU=Finance, dc=fabrikam, dc=com") Set objOldGroup = GetObject("LDAP://CN=Finance Managers, ou=Finance, dc=fabrikam, dc=com") Set objNewGroup = objOU.Create("Group", "Finance Department") objNewGroup.sAMAccountName = "financedept" objNewGroup.groupType = ADS_GROUP_TYPE_GLOBAL_GROUP objNewGroup.Set Info For Each objUser in objOldGroup.Member objNewGroup.Add "LDAP://" & objUser Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |