DESCRIPTION
This script was used during a Proof-of-Concept to convert Active Directory groups to Dynamic groups.
Note This code may use functions from the Active Roles 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 MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT ONE IDENTITY PROFESSIONAL SERVICES.
'*********************************************************************************
Option Explicit
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 ***************************************************************