This module uses the CRM connection from Microsoft.Xrm.Tooling.CrmConnector.Powershell and provides common functions to create, delete, query, and update data as well as functions for common tasks such as publishing, and manipulating System and CRM User Settings, etc. The module should function for both Dynamics CRM Online and On-Premise environment.

Minimum PowerShell version


There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name Microsoft.Xrm.Data.Powershell -RequiredVersion 2.8.9

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name Microsoft.Xrm.Data.Powershell -Version 2.8.9

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More


Sean McNellis Kenichiro Nakamura


(c) 2020 Microsoft Corporation All rights reserved.

Package Details



Dynamics Xrm CRM Dynamics365 PowerApps CDS CommonDataService PowerPlatform


Get-CrmConnection Get-CrmOrganizations




This module has no dependencies.

Release Notes

Lots of changes and enhancements to auth in this release:
- Updated to attempting SSO with oAuth by default
- Added an option for username to "hint" your username for SSO/browser based auth, if you get an immediate failure on connecting via oAuth (locally) try adding a username hint to help
- If you are logged into a managed pc by your org you should be able to use -forceoAuth and the serverurl without any other arguemnts to login and use your current users credentials
- Older auth methods continue to function as-is
- Removed requirement for redirecturi on clientsecret as it is not technically required
- redirected verbose connector output into a local file when -verbose is used with connect-crmonline
- Added option for debugging connections using a provided connectionstring - please only use this for debugging for now. NOTE: If you use this please let me know how you are using it.
- source for connector:
Including newer xrm tooling which has the following improvements:
- Added initial support for in memory log capture support.
- Fixed an issue with sovereign cloud discovery reference data that would prevent a login control from picking the correct global discovery server when connecting.
- Fixed an error where discovery would be used when using AD and IFD to connect to onpremise even if connection strings where used.
- Fixed an error where timeout property was not properly assigned when using Non-oAuth types
- Fixed an error with setting CallerId when ClientSecret Auth type is used.  


Version History

Version Downloads Last updated
2.8.19 556,259 11/15/2022
2.8.19-alpha 814 11/9/2022
2.8.17 19,098 11/1/2022
2.8.14 1,396,828 3/24/2021
2.8.13 70,213 2/3/2021
2.8.12 74,905 1/20/2021
2.8.11 430,579 9/3/2020
2.8.10 6,342 8/28/2020
2.8.9 (current version) 27,409 8/25/2020
2.8.8 179,820 4/7/2020
2.8.7 193,992 2/6/2020
2.8.5 25,146 12/13/2019
2.8.4 48,224 10/31/2019
2.8.3 4,186 10/22/2019 174,337 10/26/2018 6,378 9/17/2018 617 9/13/2018
2.8.0 44,461 5/4/2018
2.7.2 5,757 1/31/2018
2.6 3,660 8/7/2017
2.5 43,832 2/5/2017
2.4 1,431 10/6/2016
2.3 485 4/14/2016
2.1 326 1/20/2016
1.8 188 11/18/2015
Show less