The following script sample, when run in a Deprovisioning Policy Script, will add an Operation Reason into the Change History of operations performed by the Active Roles Synchronization Service.
#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 CONSULTING SERVICES OR YOUR ACCOUNT MANAGER.
#PLEASE NOTE THAT ANY MODIFICATIONS TO THE BELOW SCRIPT MAY CAUSE UNDESIRED RESULTS AND/OR BREAK PRODUCT FUNCTIONALITY.
#TAKEN FROM THE FOLLOWING PUBLIC RESOURCE:
#TITLE: HOW TO: Add an Active Roles Administration Service Control into an operation performed by the Active Roles Synchronization Service
$FromARSS = $Request.GetInControl("ActiveRolesSyncService")
$Request.PutInControl("OperationReason",$Constants.ADSTYPE_CASE_IGNORE_STRING,"Deprovisioned by the Active Roles Synchronization Service")