> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/resource-management-powershell/help-and-support/quick-reference-guide.md).

# Quick reference guide

The following code snippet shows the basic search, get, create and delete operations that are possible with the module

```powershell
# Import the module
Import-Module LithnetRMA;

# Connect to the MIM service instance
# (in PowerShell 7 use pipe://mim-service, or rmc://mim-service on Linux and macOS)
Set-ResourceManagementClient -BaseAddress http://mim-service:5725;

# Get a user by its account name
$obj = Get-Resource -ObjectType Person -AttributeName AccountName -AttributeValue ryan;

# Write all the attributes of the user to the screen
Write-Host $obj;

# Set a new value for the JobTitle attribute
$obj.JobTitle = "Tester";

# Save the changes to the Resource Management Service
Save-Resource $obj

# Search for a set
Search-Resources -XPath "/Set[DisplayName = 'Administrators']"

# Search for a set and return all attributes in the set object type
$set = Search-Resources -XPath "/Set[DisplayName = 'Administrators']" -ExpectedObjectClass Set
Write-Host $set

# Search for a set and return only the computed member and explicit member attributes in the set object type
Search-Resources -XPath "/Set[DisplayName = 'Administrators']" -AttributesToGet @("ComputedMember", "ExplicitMember")

# Delete a resource by a known ID
Remove-Resource 'cacfb5f3-4924-4b56-89ee-b6b0de3e36d5'

# Remove a resource by its reference using the pipeline
Get-Resource Person AccountName testuser | Remove-Resource

# Create a new user
$newObject = New-Resource -ObjectType Person
$newObject.AccountName = "testuser";
Save-Resource $newObject

# Get pending approvals
$pendingApprovals = Get-ApprovalRequest -Status Pending

# Approve pending approvals
Get-ApprovalRequest -Status Pending | Set-PendingApprovalRequest -Decision Approve -Reason "I said so!"

# Reject pending approvals
Get-ApprovalRequest -Status Pending | Set-PendingApprovalRequest -Decision Reject -Reason "I said so!"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lithnet.io/resource-management-powershell/help-and-support/quick-reference-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
