Microsoft.Xrm.Data.PowerShell Cheat Sheet

The Microsoft.Xrm.Data.Powershell module is a powerful tool for managing and automating Power Platform tasks in PowerShell. This cheat sheet covers essential cmdlets for Power Platform developers and administrators.

Authentication

NOTE: If Get-CrmConnection is used then the -conn parameter must be passed to the cmdlets below.

Retrieve a record

Optional Parameters:

-Fields: String array of columns to return.

-IncludeNullValue: A switch to include columns even if they have null values.

Retrieve multiple records

Optional Parameters:

-FilterAttribute: Logical name of the column to filter

-FilterOperator: A conditional operator

-FilterValue: The value to filter by.

-Fields: String array of columns to return.

-AllRows: A swtich to return all rows.

-TopCount: The number of rows to return.

Retrieve multiple records with FetchXML

Optional Parameters:

-TopCount: The number of rows to return.

-PageNumber: The page number to return.

-PageCookie: The paging cookie.

-AllRows: A swtich to return all rows.

Retrieve multiple records by view name

Optional Parameters:

-IsUserView: Speficy $true if the view is User View.

-AllRows: A swtich to return all rows.

-TopCount: The number of rows to return.

Create a record

Update a record

Optional Parameters:

-Upsert: A swtich to upsert the record.

Delete a record

Handing diferent column types

Check back later, advanced operations coming soon :)

All views expressed in my blog are my own and do not represent the opinions of any entity whatsover with which i have been, am now, or will be affiliated.