'*********************************************************************************
' 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 ONE IDENTITY PROFESSIONAL SERVICES.
'*********************************************************************************
- Save the attached PowerShell script as a .ps1 file.
- Using a text editor, update the $date, $managedUnitDN, and $muScopeDN to values matching the target environment and needs.
NOTE: It is also possible to use this script to create a Managed Unit which is targeted to the Deleted Objects container (the Active Directory Recycle Bin), a scope which is not possible to select in the Active Roles Console. Simply specify the DN of the Deleted Objects container, which can be found on the Object property tab in the Active Roles Console.
- In the Active Roles Console, expand Configuration/Script Modules
- Right-click on the Script Modules container and choose Import
- Browse for and select the modified .ps1 file
- When importing, ensure that the Script type is set to Scheduled task script as per the below screenshot:

- Expand Configuration/Server Configuration/Scheduled Tasks
- Right-click on the Scheduled Tasks container and choose New | Scheduled Task
- In the Scheduled Task creation wizard, set the desired name and schedule, and choose the script module imported above, then complete the wizard