In Sync Rule which leverages a PowerShell script, working with objects which contain a GUID can result in error messages similar to the following:
Value was either too large or too small for an unsigned byte.
It is necessary to use the [System.BitConverter]::ToString method in order to convert a GUID into the format required for a clean comparison.
EXAMPLE:
##############################################################################
The below script is known to work successfully; however, it has not been officially tested by our Quality Control. If any of these instructions are changed and/or incorrectly used, intentionally or unintentionally, this solution becomes unsupported by our Support and Development. Support and Development recommend always making a backup of the current database prior to execution of any script(s) that may modify it. For customization of the Active Roles Solution, please contact our Professional Services Organization.
##############################################################################
#This script will check to see if there is a value in the "mS-DS-ConsistencyGuid" attribute in the target system. If there #is, it is left intact. Otherwise, the value of the "mS-DS-ConsistencyGuid" attribute in the source system is returned.
if($dstObj["mS-DS-ConsistencyGuid"])
{
$guidStrd = $dstObj["mS-DS-ConsistencyGuid"]
[System.BitConverter]::ToString($guidStrd)
}
else
{
if($srcObj["mS-DS-ConsistencyGuid"])
{
$bytes1 = $srcObj["mS-DS-ConsistencyGuid"]
[System.BitConverter]::ToString($bytes1)
}
else
{
$NULL
}
}
© 2024 One Identity LLC. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center