.SYNOPSIS

Creates a new ImportObject for the FIM Configuration Migration Cmdlets

.DESCRIPTION

The New-FimImportObject function makes it easier to use Import-FimConfig by providing an easier way to create ImportObject objects.
This makes it easier to perform CRUD operations in the FIM Service.

.PARAMETER ObjectType

The object type for the target object.
NOTE: this is case sensitive
NOTE: this is the ResourceType's 'name' attribute, which often does NOT match what is seen in the FIM Portal.

.PARAMETER State

The operation to perform on the target, must be one of:
-Create
-Put
-Delete
-Resolve
-None

.PARAMETER AnchorPairs

A name:value pair used to find a target object for Put, Delete and Resolve operations. The AchorPairs is used in conjunction with the ObjectType by the FIM Import-FimConfig cmdlet to find the target object.

.PARAMETER SourceObjectIdentifier

Not intelligently used or tested yet...

.PARAMETER TargetObjectIdentifier

The ObjectID of the object to operate on.
Defaults to an empty GUID

.PARAMETER Changes

The changes to make to the target object. This parameter accepts a Hashtable or FIM ImportChange objects as input. If a Hashtable is supplied as input then it will be converted into FIM ImportChange objects. You're welcome.

.PARAMETER ApplyNow

When specified, will sumit the request to FIM

.PARAMETER PassThru

When specified, will return the ImportObject as output

.PARAMETER SkipDuplicateCheck

When specified, will skip the duplicate create request check

.PARAMETER Uri

The Uniform Resource Identifier (URI) of themmsshortService. The following example shows how to set this parameter: -uri "http://localhost:5725"

.OUTPUTS

The FIM ImportObject is returned by this function. The next logical step is take this output and feed it to Import-FimConfig.

.EXAMPLE

Creates an ImportObject for creating a new Person object with AccountName and DisplayName.
This example uses a hashtable for the Changes parameter.
$createRequest = New-FimImportObject -ObjectType Person -State Create -Changes @{
AccountName='Bob' 
DisplayName='Bob the Builder'
} -PassThru
$createRequest | Import-FIMConfig

.EXAMPLE

Creates an ImportObject for creating a new Person object with AccountName and DisplayName.
This exmaple uses an array of ImportChange objects for the Changes parameter.
NOTE: the attribute 'Operation' type of 'None' works when the object 'State' is set to 'Create'.
New-FimImportObject -ObjectType Person -State Create -Changes @(
   New-FimImportChange -Operation None -AttributeName 'Bob' -AttributeValue 'foobar' 
   New-FimImportChange -Operation None -AttributeName 'DisplayName' -AttributeValue 'Bob the Builder' 
) -ApplyNow

.EXAMPLE

Creates an ImportObject for creating a new Person object with AccountName and DisplayName.
This example uses the ApplyNow parameter instead of variables.
New-FimImportObject -ObjectType Person -State Create -Changes @{
   AccountName='Bob' 
   DisplayName='Bob the Builder'
} -ApplyNow

.EXAMPLE

Creates an ImportObject for updating an existing Person object with FirstName and LastName.
New-FimImportObject -ObjectType Person -State Put -AnchorPairs @{AccountName='Bob'} -Changes @(
   New-FimImportChange -Operation Replace -AttributeName 'FirstName' -AttributeValue 'Bob' 
   New-FimImportChange -Operation Replace -AttributeName 'LastName' -AttributeValue 'TheBuilder'  
) -ApplyNow

.EXAMPLE

Creates an ImportObject for deleting a Person object.
New-FimImportObject -ObjectType Person -State Delete -AnchorPairs @{AccountName='Bob'} -ApplyNow

Last edited Aug 14, 2012 at 5:25 AM by CraigMartin, version 2

Comments

No comments yet.