Skip to content

Get AcmaObject

Ryan Newington edited this page Sep 4, 2025 · 7 revisions

Get-AcmaObject

Description

Gets an instance of an ACMA object from the database

Syntax

# Get object by ID
Get-AcmaObject -ID <guid>

# Get object by object type and single attribute
Get-AcmaObject -ObjectType <string> -AttributeName <string> -AttributeValue <object>

# Get object by object type and multiple attributes
Get-AcmaObject -ObjectType <string> -AttributeValuePairs <hashtable>

Parameters

-ID

The object ID of the ACMA object

Type: Guid
Required: Yes (for ID parameter set)
Position: 1
Accept pipeline input: Yes

-ObjectType

The object class name to search within

Type: String
Required: Yes (for attribute-based searches)
Position: 1
Accept pipeline input: Yes

-AttributeName

The name of the attribute to search by (used with ObjectType)

Type: String
Required: Yes (when using single attribute search)
Position: 2

-AttributeValue

The value to search for in the specified attribute

Type: Object
Required: Yes (when using single attribute search)
Position: 3

-AttributeValuePairs

A hashtable of attribute name/value pairs for multi-attribute searches

Type: Hashtable
Required: Yes (when using multi-attribute search)
Position: 2

Return type

The cmdlet returns a reference to an AcmaPSObject

Examples

Example 1: Get object by ID

$object = Get-AcmaObject -ID "8f495b8d-799e-4eb1-9edf-dbe07fc01464"

Example 2: Get object by attribute value

$person = Get-AcmaObject -ObjectType "person" -AttributeName "accountName" -AttributeValue "jsmith"

Example 3: Get object by multiple attributes

$attributes = @{
    "firstName" = "John"
    "lastName" = "Smith"
}
$person = Get-AcmaObject -ObjectType "person" -AttributeValuePairs $attributes

Clone this wiki locally