Hello,
i'm trying to automate group creation in FIM by using a powershell script.
as i found this page on technet i'm trying to use already build functions from there but for some reasons things are not working as i was expecting to.
"ResolveObject" is the functions that doesn't seems to work, or i'm totally wrong about what it suppose to do.
i was expecting that this function should identify an object in FIM in order to use its ObjectID (for example on group creation - to identofy group owner object) - eider it doesn't suppose to do this or it has some mistake in it.
Can anyone please help me understand or fix this function,
Thanks,
Marius
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
}
}


