cmdlets in Microsoft.Xrm.Data.PowerShell

Please find the list of cmdlets and usage of them .

Functionsusage
Add-CrmActivityToCrmRecordCreate a new activity to a record.
Add-CrmMultiRecordAssociationAssociates multiple records to single record for N:N relationship.
Add-CrmNoteToCrmRecordCreate a new note (annotation) to a record.
Add-CrmRecordAssociationAssociates two records for N:N relationship.
Add-CrmSampleDataAdd sample data CRM Organization.
Add-CrmSecurityRoleToTeamAssigns a security role to a team.
Add-CrmSecurityRoleToUserAssigns a security role to a user.
Approve-CrmEmailAddressApprove email address change of a user or a queue.
Connect-CrmOnlineConnects to CRM Online organization without using Discovery Service.
Connect-CrmOnlineDiscoveryRetrieves all CRM Online Organization you belong to, let you selectwhich organization to login, then returns connection information.
Connect-CrmOnPremDiscoveryRetrieves all CRM OnPrem orgs you belong to, let you select which organization to login, then returns connection information.
Disable-CrmLanguagePackExecutes DeprovisionLanguageRequest Organization Request.
Enable-CrmLanguagePackExecutes ProvisionLanguageRequest Organization Request.
Export-CrmApplicationRibbonXmlRetrieves the ribbon definition XML for application and saves ittoa file on the file system.
Export-CrmEntityRibbonXmlRetrieves the ribbon definition XML for an Entity and saves it to afile on the file system.
Export-CrmSolutionExports a solution by Name from a CRM Organization.
Export-CrmSolutionTranslationExports a translation from a solution.
Get-CrmAllLanguagePacksExecutes RetrieveAvailableLanguagesRequest Organization Request.
Get-CrmEntityAllMetadataRetrieves all Metadata for CRM organization.
Get-CrmEntityAttributeMetadataRetrieves an attribute metadata for an Entity.
Get-CrmEntityAttributesRetrieves all attributes metadata for an Entity.
Get-CrmEntityDisplayNameRetrieves Display Name for an Entity.
Get-CrmEntityDisplayPluralNameRetrieves Display Plural Name for an Entity.
Get-CrmEntityMetadataRetrieves Metadata for an Entity.
Get-CrmEntityNameRetrieves Entity logicalname for EntityTypeCode.
Get-CrmEntityOptionSetRetrieves a picklist field of an Entity.
Get-CrmEntityRecordCountRetrieves total record count for an Entity.
Get-CrmEntityTypeCodeRetrieves EntityTypeCode for an Entity.
Get-CrmFailedWorkflowsRetrieves alert notifications from CRM organization.
Get-CrmGlobalOptionSetRetrieves a global OptionSet.
Get-CrmLicenseSummaryDisplays License assignment and AccessMode/CalType summary.
Get-CrmOrgDbOrgSettingsRetrieves CrmOrgDbOrgSettings.
Get-CrmRecordRetrieves a CRM record by specifying EntityLogicalName, record’sId(guid) and field names.
Get-CrmRecordsRetrieves CRM records by using single filter condition.
Get-CrmRecordsByFetchRetrieves CRM records by using FetchXML query.
Get-CrmRecordsByViewNameRetrieves CRM records by using View Name.
Get-CrmRecordsCountRetrieves CRM entity total record counts.
Get-CrmSdkMessageProcessing
StepsForPluginAssembly
Retrieves all registered steps for Plugin.
Get-CrmSiteMapRetrieves CRM Organization’s SiteMap information.
Get-CrmSystemSettingsRetrieves CRM Organization’s System Settings.
Get-CrmTimeZonesRetrieves CRM Timezone information.
Get-CrmTraceAlertsRetrieves alert notifications from CRM organization.
Get-CrmUserMailboxRetrieves CRM user’s mailbox.
Get-CrmUserPrivilegesRetrieves privileges a CRM User has.
Get-CrmUserSecurityRolesRetrieves Security Roles assigned to a CRM User.
Get-CrmUserSettingsRetrieves CRM user’s settings.
Get-MyCrmUserIdRetrieves login user’s CRM UserId (guid).
Grant-CrmRecordAccessGrant access privilege to a crm record.
Import-CrmSolutionImports solution file to CRM Organization….
Import-CrmSolutionAsyncImport a solution using an import job.
Import-CrmSolutionTranslationImports a translation to a solution.
Invoke-CrmActionInvoke a CDS or CRM Action
Invoke-CrmRecordWorkflowRuns an on-demand workflow for a record.
Invoke-CrmWhoAmIExecutes WhoAmI Organization Request and returns current user’sId(guid), belonging BusinessUnit Id (guid) and CRM Organization Id (guid).
Merge-CrmHoldingSolutionAsync 
Move-CrmRecordToQueueMove a CRM record to a Queue
New-CrmEntityReferenceInstantiates EntityReference type object.
New-CrmMoneyInstantiates Money type object.
New-CrmOptionSetValueInstantiates OptionSetValue type object.
New-CrmRecordCreates a new CRM record by specifying field name/value set, andreturns record guid.
Publish-CrmAllCustomizationPublishes all customizations for a CRM Organization.
Publish-CrmCustomizationPublishes specified customizations for a CRM Organization.
Publish-CrmEntityPublishes customization for an Entity.
Publish-CrmThemePublishes a Theme for a CRM Organization.
Remove-CrmEntityMetadataCacheRemoves metadata cache for an Entity.
Remove-CrmRecordDelete a CRM record by specifying EntityLogicalName and record’sId(guid)
Remove-CrmRecordAssociationAssociates two records for N:N relationship.
Remove-CrmSampleDataRemoves sample data CRM Organization.
Remove-CrmSecurityRoleFromTeamRemoves a security role from a team.
Remove-CrmSecurityRoleFromUserRemoves a security role to a user.
Remove-CrmUserManagerRemoves CRM user’s manager.
Revoke-CrmEmailAddressRevoke email address change of a user or a queue.
Revoke-CrmRecordAccessRevokes (removes) access rights on the target record for the specified security principal (user or team).
Set-CrmActivityRecordToCloseStateClose an activity record.
Set-CrmConnectionCallerIdSets CRM Connection CallerId to impersonate.
Set-CrmConnectionTimeoutSets CRM Connection timeout value in seconds.
Set-CrmQueueMailbox 
Set-CrmRecordUpdates a new CRM record by specifying EntityLogicalName, record’sId (guid) and field name/value sets.
Set-CrmRecordAccessSets a security principal’s (user or team) access to the specifiedrecord.
Set-CrmRecordOwnerAssign an user as a CRM record’s owner
Set-CrmRecordStateSets Status/State for a CRM record.
Set-CrmSolutionVersionNumber
Set-CrmSystemSettingsUpdate CRM Organization’s System Settings.
Set-CrmUserBusinessUnitMoves Crm User to another Business Unit.
Set-CrmUserMailboxUpdates CRM user’s mailibox.
Set-CrmUserManagerSets CRM user’s manager.
Set-CrmUserSettingsUpdate CRM user’s settings.
Test-CrmSampleDataInstalledChecks if sample data has been installed to CRM Organization.
Test-CrmTimerStart 
Test-CrmTimerStop 
Test-CrmViewPerformanceTest CRM View performance.
Get-CrmConnectionReturns a connection to a Microsoft Dynamics CRM instance.
Get-CrmOrganizationsReturns a list of Microsoft Dynamics CRM organizations that thecurrent user has access to.

We deep drive in to some of useful cmdlets by group them to achieve specific automation processes and further we will go through some examples .

Leave a comment