ResolveObject
Applies To: Forefront Identity Manager 2010
This is an example of a Windows PowerShell function that creates a new ImportObject object based on a FIM object type, attribute name, and attribute value. For more information, see FIM Windows PowerShell Cmdlet Examples.
ResolveObject Function
# States
# 0 = Create
# 1 = Put
# 2 = Delete
# 3 = Resolve
# 4 = None
function ResolveObject
{
PARAM([string] $ObjectType, [string]$AttributeName, [string]$AttributeValue)
END
{
$importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
$importObject.TargetObjectIdentifier = $TargetIdentifier
$importObject.ObjectType = $ObjectType
$importObject.State = 3 # Resolve
$importObject.SourceObjectIdentifier = [System.String]::Format("urn:uuid:{0}", [System.Guid]::NewGuid().ToString())
$importObject.AnchorPairs = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.JoinPair
$importObject.AnchorPairs[0].AttributeName = $AttributeName
$importObject.AnchorPairs[0].AttributeValue = $AttributeValue
$importObject
}
}
Remarks
This is a basic function that is reused by other example functions, such as the CreateGroup function and the AddMembersToGroup function.
See Also
Concepts
FIM Windows PowerShell Cmdlet Examples
Configuration Migration Deployment Guide
CreateImportChange
AddImportChangeToImportObject