AddImportChangeToImportObject

Applies To: Forefront Identity Manager 2010

This is an example of a Windows PowerShell function that adds an instance of an ImportChange object to an instance of an ImportObject object based on a specific FIM object type. For more information, see FIM Windows PowerShell Cmdlet Examples.

AddImportChangeToImportObject Function

function AddImportChangeToImportObject
{
    PARAM($ImportChange, $ImportObject)
    END
    {
        if ($ImportObject.Changes -eq $null)
        {
            $ImportObject.Changes = (,$ImportChange)
        }
        else
        {
            $ImportObject.Changes += $ImportChange
        }
    }
}

Remarks

This is a basic function that is reused by other example functions such as the AddMultiValue function, the SetSingleValue function, and the RemoveMultiValue function.

See Also

Concepts

FIM Windows PowerShell Cmdlet Examples
CreateImportChange
CreateImportObject