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
  • Text
  • Binary
  1. help and support

XPath expression examples

PreviousWorking with different data and attribute types

Last updated 2 years ago

The , and cmdlets can be used to create many different query types. This page demonstrates how various expressions are rendered based on their attribute types.

String

Operator
Example

Equals

/Person[(AccountName = 'ryan')]

NotEquals

/Person[(not(AccountName = 'ryan'))]

GreaterThan

<not supported>

GreaterThanOrEquals

<not supported>

LessThan

<not supported>

LessThanOrEquals

<not supported>

IsPresent

/Person[(starts-with(AccountName, '%'))]

IsNotPresent

/Person[(not(starts-with(AccountName, '%')))]

Contains

/Person[(contains(DisplayName, 'ryan'))]

StartsWith

/Person[(starts-with(DisplayName, 'ryan'))]

EndsWith

/Person[(ends-with(DisplayName, 'ryan'))]

Integer

Operator
Example

Equals

/Person[(unixGid = 44)]

NotEquals

/Person[(not(unixGid = 44))]

GreaterThan

/Person[(unixGid > 44)]

GreaterThanOrEquals

/Person[(unixGid >= 44)]

LessThan

/Person[(unixGid < 44)]

LessThanOrEquals

/Person[(unixGid <= 44)]

IsPresent

/Person[(unixGid <= 999999999999999)]

IsNotPresent

/Person[(not(unixGid <= 999999999999999))]

Contains

<not supported>

StartsWith

<not supported>

EndsWith

<not supported>

DateTime

Operator
Example

Equals

/Person[(ExpiryDate = '2015-12-31T00:00:00.000')]

NotEquals

/Person[(not(ExpiryDate = '2015-12-31T00:00:00.000'))]

GreaterThan

/Person[(ExpiryDate > '2015-12-31T00:00:00.000')]

GreaterThanOrEquals

/Person[(ExpiryDate >= '2015-12-31T00:00:00.000')]

LessThan

/Person[(ExpiryDate < '2015-12-31T00:00:00.000')]

LessThanOrEquals

/Person[(ExpiryDate <= '2015-12-31T00:00:00.000')]

IsPresent

/Person[(ExpiryDate <= '9999-12-31T23:59:59.997')]

IsNotPresent

/Person[(not(ExpiryDate <= '9999-12-31T23:59:59.997'))]

Contains

<not supported>

StartsWith

<not supported>

EndsWith

<not supported>

Boolean

Operator
Example

Equals

/Person[(AccountDisabled = true)]

NotEquals

/Person[(not(AccountDisabled = true))]

GreaterThan

<not supported>

GreaterThanOrEquals

<not supported>

LessThan

<not supported>

LessThanOrEquals

<not supported>

IsPresent

/Person[((AccountDisabled = true) or (AccountDisabled = false))]

IsNotPresent

/Person[(not(((AccountDisabled = true) or (AccountDisabled = false)))]

Contains

<not supported>

StartsWith

<not supported>

EndsWith

<not supported>

Reference

Operator
Example

Equals

/Person[(Manager = '3ede2d5f-a6db-4795-b07a-827840024940')]

Equals (expression)

/Person[(Manager = /Person[(AccountName = 'ryan')])]

NotEquals

/Person[(not(Manager = '3ede2d5f-a6db-4795-b07a-827840024940'))]

GreaterThan

<not supported>

GreaterThanOrEquals

<not supported>

LessThan

<not supported>

LessThanOrEquals

<not supported>

IsPresent

/Person[(Manager = /*)]

IsNotPresent

/Person[(not(Manager = /*))]

Contains

<not supported>

StartsWith

<not supported>

EndsWith

<not supported>

Text

Querying text attributes is not supported by the FIM service

Binary

Querying binary attributes is not supported by the FIM service

New-XPathQuery
New-XPathQueryGroup
New-XPathExpression