Import-FIMConfig

Import-FIMConfig

Imports changes into the target FIM Service by using Web service calls.

Syntax

Import-FIMConfig [-uri] <string> [-credential <Credential>] [-importObject <ImportObject[]>] [<CommonParameters>]

Detailed Description

The Import-FIMConfig cmdlet takes in a list of ImportObject instances. Each ImportObject represents one atomic Web service call to make. Each Web service call can contain multiple attribute-level changes. As the cmdlet creates resources, the cmdlet resolves references automatically in subsequent update and create operations.

All ImportObject instances sent to Import-FIMConfig are run. You can construct ImportObject instances from custom Windows PowerShell™ scripts or Microsoft .NET code and provide them to Import-FIMConfig for processing.

For more information about ImportObject instances and about the Microsoft® Forefront Identity Manager (FIM) 2010 Windows PowerShell cmdlet set, see Forefront Identity Manager Configuration with Windows PowerShell.

Parameters

--Uri <string>

Specifies the Uniform Resource Identifier (URI) of the FIM Service.

The following example shows how to set this parameter to a specific FIM Service.

–uri “https://localhost:5725/ResourceManagementService”

Attributes

Name Value

Required?

false

Accept Wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

--Credential <Credential>

Specifies the Windows PowerShell credential to use when you perform Web service operations.

The following example shows how to set this parameter.

$credential = Get-Credential

–credential $credential

Attributes

Name Value

Required?

false

Accept Wildcard characters?

true

Accept Pipeline Input?

false

Position?

named

--ImportObject <Credential>

Specifies the list of ImportObject instances to commit to the FIM Service.

The following example shows how to set this parameter.

$changes | Import-FIMConfig

Attributes

Name Value

Required?

false

Accept Wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

--CommonParameters

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

-CommonParameter

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Examples

EXAMPLE 1

Command prompt: **

 
          $UndoneImports = $imports | Import-FIMConfig -uri https://localhost:5725/ResourceManagementService 
          $undoneImports | ConvertFrom-FIMResource –file undone.xml 
        

This is a simple example of importing.

Note that this example stores the return value to inspect that all changes were made successfully.

EXAMPLE 2

Command prompt: **

 
          <?xml version="1.0" encoding="utf-8"?> 
          <Results xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema"> 
          <ImportObject> 
          <SourceObjectIdentifier>urn:uuid:e41e9332-2a9b-4b78-bfd4-61a9476c1a92</SourceObjectIdentifier> 
          <ObjectType>Set</ObjectType> 
          <State>Create</State> 
          <Changes> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>DisplayName</AttributeName> 
          <AttributeValue>All Helpdesk Nav Bar Set</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ExplicitMember</AttributeName> 
          <AttributeValue>urn:uuid:576d7226-3742-4927-85b9-9ea1248d9e6e</AttributeValue> 
          <FullyResolved>false</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ObjectType</AttributeName> 
          <AttributeValue>Set</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          </Changes> 
          <AnchorPairs> 
          <JoinPair> 
          <AttributeName>DisplayName</AttributeName> 
          <AttributeValue>All Helpdesk Nav Bar Set</AttributeValue> 
          </JoinPair> 
          </AnchorPairs> 
          </ImportObject> 
          <ImportObject> 
          <SourceObjectIdentifier>urn:uuid:f453b03f-70b4-47c0-a849-29777c8d0a39</SourceObjectIdentifier> 
          <ObjectType>ManagementPolicyRule</ObjectType> 
          <State>Create</State> 
          <Changes> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ActionParameter</AttributeName> 
          <AttributeValue>*</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ActionType</AttributeName> 
          <AttributeValue>Read</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>Disabled</AttributeName> 
          <AttributeValue>False</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>DisplayName</AttributeName> 
          <AttributeValue>Helpdesk Users can read Unlock Users Nav Bar</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>GrantRight</AttributeName> 
          <AttributeValue>True</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ObjectType</AttributeName> 
          <AttributeValue>ManagementPolicyRule</AttributeValue> 
          <FullyResolved>true</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>PrincipalSet</AttributeName> 
          <AttributeValue>urn:uuid:e41e9332-2a9b-4b78-bfd4-61a9476c1a92</AttributeValue> 
          <FullyResolved>false</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          <ImportChange> 
          <Operation>None</Operation> 
          <AttributeName>ResourceCurrentSet</AttributeName> 
          <AttributeValue>urn:uuid:e41e9332-2a9b-4b78-bfd4-61a9476c1a92</AttributeValue> 
          <FullyResolved>false</FullyResolved> 
          <Locale>Invariant</Locale> 
          </ImportChange> 
          </Changes> 
          <AnchorPairs> 
          <JoinPair> 
          <AttributeName>DisplayName</AttributeName> 
          <AttributeValue>Helpdesk Users can read Unlock Users Nav Bar</AttributeValue> 
          </JoinPair> 
          </AnchorPairs> 
          </ImportObject> 
          </Results> 
        

This is an example of an ImportObject that creates a ManagementPolicyRule resource with the references to Set resources that have not been created yet.

Note that you would include the ImportObjects inside a file and load them by using ConvertTo-FIMResource. This is an example on how to script batch operations in FIM.

See Also

Reference

Export-FIMConfig
Join-FIMConfig
Compare-FIMConfig
ConvertFrom-FIMResource
ConvertTo-FIMResource