DESCRIPTION
This script was used during a POC to convert Active Directory groups, created by MIIS, to Dynamic groups.
Note This code may use functions from the ARS Script Policy Best Practices. Please, follow the link to obtain instructions and code for those functions.
SCRIPT
'*********************************************************************************
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
' WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT QUEST PROFESSIONAL SERVICES.
'*********************************************************************************
'
' This code is published on the ActiveRoles Script Center:
' http://communities.quest.com/docs/DOC-9991
'
' This code may use functions from the ARS Script Policy Best Practices:
' http://communities.quest.com/docs/DOC-10016
'
' Please, follow the link to obtain instructions and code for those functions.
'*********************************************************************************
Sub onPostCreate(Request)
If Request.Class <> "group" Then Exit Sub
Set obj = GetObject(Request.AdsPath)
obj.getinfo
If obj.description = "" Then Exit Sub
strcondition = obj.description
Dim Rule(0)
' Create a new Include by Query rule
Set Rule(0) = CreateObject("EDSIManagedUnitCondition")
Rule(0).Base = "EDMS://OU=GIT,DC=acer2test,DC=com"
Rule(0).Filter = "(&(objectClass=user)(" & strcondition & "))"
Rule(0).Type = 1
obj.ConvertToDynamicGroup(Rule)
obj.SetInfo
Set obj = Nothing
End Sub
'***** END OF CODE ***************************************************************
COMPATIBILITY
Script compatible with the following version(s): <Not specified>