Resource Management Powershell
Documentation Home
  • Home
  • Installation
    • Installing the PowerShell module
  • Configuration
    • Configuration management
    • ConfigSync File
    • Variables File
      • <Variables> element
        • <Variable> element
    • <Operations> element
      • <ResourceOperation> element
      • <AnchorAttributes> element
      • <AnchorAttribute> element
      • <AttributeOperations> element
        • <AttributeOperation> element
    • Building references
  • Usage
    • Cmdlet reference
      • Set-ResourceManagementClient
      • Get-Resource
      • Save-Resource
      • Search-Resources
      • Search-ResourcesPaged
      • Remove-Resource
      • New-Resource
      • Update-ResourceManagementClientSchema
      • Import-RMConfig
      • New-XPathQuery
      • New-XPathQueryGroup
      • New-XPathExpression
      • Get-ApprovalRequest
      • Set-PendingApprovalRequest
  • help and support
    • Quick reference guide
    • Working with different data and attribute types
    • XPath expression examples
Powered by GitBook
On this page
  • Using a known Object ID
  • Referencing another ResourceOperation element
  • Referencing an object that exists in the FIM Service
  • Deferencing an XML ResourceOperation
  1. Configuration

Building references

Previous<AttributeOperation> elementNextCmdlet reference

Last updated 2 years ago

There are three ways to create reference values in your XML files.

Using a known Object ID

If you know the Object ID of an object in the FIM service, you can reference the Object ID directly. The following example shows adding the built-in administrator to the membership of a set

<AttributeOperation operation="add" name="ExplicitMember">7fb2b853-24f0-4498-9534-4e10589723c4</AttributeOperation>

Referencing another ResourceOperation element

If you have a resource defined in your XML file as a , you can reference the ResourceObject instead, and the tool will automatically populate the reference attribute with the correct Object ID using an with a type of xmlref

<!-- Create the workflow to reference -->
<ResourceOperation operation="Add Update" resourceType="WorkflowDefinition" id="demoWorkflowDefinition">
      <AnchorAttributes>
        <AnchorAttribute>DisplayName</AnchorAttribute>
      </AnchorAttributes>
      <AttributeOperations>
        <AttributeOperation operation="replace" name="DisplayName">___Demo Workflow Definition</AttributeOperation>
        <AttributeOperation operation="replace" name="XOML" type="file">.\Templates\WFDemo.xml</AttributeOperation>
        <AttributeOperation operation="replace" name="RequestPhase">Action</AttributeOperation>
        <AttributeOperation operation="replace" name="RunOnPolicyUpdate">false</AttributeOperation>
      </AttributeOperations>
</ResourceOperation>

<!-- Update the MPR that references the workflow -->
<ResourceOperation operation="Update" resourceType="ManagementPolicyRule" id="demoMPR">
      <AnchorAttributes>
        <AnchorAttribute>DisplayName</AnchorAttribute>
      </AnchorAttributes>
      <AttributeOperations>
        <AttributeOperation operation="none" name="DisplayName">___Demo MPR - Triggers Workflow</AttributeOperation>
        <AttributeOperation operation="replace" name="ActionWorkflowDefinition" type="xmlref">demoWorkflowDefinition</AttributeOperation>
       </AttributeOperations>
</ResourceOperation>

Referencing an object that exists in the FIM Service

<AttributeOperation operation="add" name="ExplicitMember" type="reference">Set|DisplayName|Administrators</AttributeOperation>

Deferencing an XML ResourceOperation

You can dereference a ResourceOperation and get one of the attributes contained in the object using a special variable syntax using the format ##xmlref:<xmlrefid>:<attribute name>##. In the following example we define a Workflow definition with its known display name

<ResourceOperation operation="None" resourceType="WorkflowDefinition" id="demoWorkflowDefinition">
      <AnchorAttributes>
        <AnchorAttribute>DisplayName</AnchorAttribute>
      </AnchorAttributes>
      <AttributeOperations>
        <AttributeOperation operation="none" name="DisplayName">___Demo Workflow Definition</AttributeOperation>
      </AttributeOperations>
</ResourceOperations>

Which can then be referenced by attribute operations within other ResourceOperations

<AttributeOperation operation="replace" name="Description">Triggers the "##xmlref:demoWorkflowDefinition:DisplayName##" workflow</AttributeOperation>

If you know that an object exists in the FIM service (such as an object-of-box object), you can reference it directly using the reference type on the . The following example sets the ExplicitMember attribute of one object to a reference to the "Administrators" built-in set.

ResourceOperation element
AttributeOperation
AttributeOperation element