Microsoft.Crm.PowerShell

With Windows PowerShell you can easily run deployment commands to change the configuration of your deployment, like tasks that can be performed from the Deployment Manager user interface. The PowerShell cmdlets are installed on the computer when you install a Full Server role or when you install the Deployment Tools server role, if you’re installing individual server roles. To execute commands, you must first register the Dynamics 365 commands with PowerShell. This topic describes how to do this plus additional tasks to help you use PowerShell.

Important

These PowerShell cmdlets only work with on-premises versions of Dynamics 365.

Microsoft.Crm.PowerShell

Add-CrmDatabase

Restores or attaches to SQL Server the specified Dynamics 365 database from a Microsoft SQL Server MDF (raw database file) or a SQL Server backup file.

Add-CrmServer

Adds a Dynamics 365 server to the specified deployment.

Disable-CrmOrganization

Disables the specified Microsoft Dynamics 365 organization.

Disable-CrmServer

Disables the specified Dynamics 365 server.

Edit-CrmOrganization

Edits properties of the specified Dynamics 365 organization.

Enable-CrmOrganization

Enables the specified Dynamics 365 organization.

Enable-CrmServer

Enables the specified Dynamics 365 server that is currently disabled.

Get-CrmAccessLicense

Retrieves the server licensing and client access license (CAL) information for the Dynamics 365 deployment.

Get-CrmAdvancedSetting

Returns an advanced setting value for the Dynamics 365 deployment.

Get-CrmCertificate

Retrieves the certificate information for Dynamics 365.

Get-CrmDeploymentAdministrator

Retrieves all deployment administrators for the Dynamics 365 deployment.

Get-CrmLicenseProperty

Retrieves the license properties for the Dynamics 365 deployment.

Get-CrmMonitoringResult

Retrieves results from the monitoring service operations tests for the Dynamics 365 deployment.

Get-CrmOperationStatus

Retrieves the status of asynchronous operations that are in the asynchronous operation queue for Dynamics 365.

Get-CrmOrganization

Retrieves information for one or all of the organizations in the Dynamics 365 deployment.

Get-CrmOrganizationUserMap

Retrieves users from the specified organization and outputs an XML file that can be used to map users as part of an organization import.

Get-CrmServer

Retrieves details for one or all Dynamics 365 servers in a deployment.

Get-CrmSetting

Retrieves a Dynamics 365 deployment setting object.

Import-CrmOrganization

Initiates the process to import a Dynamics 365 organization database into the deployment.

New-CrmDeploymentAdministrator

Creates a new deployment administrator for the Dynamics 365 deployment.

New-CrmOrganization

Initiates the process to create a new organization in the Dynamics 365 deployment.

Remove-CrmCertificate

Removes the specified certificate from the Dynamics 365 deployment.

Remove-CrmDeploymentAdministrator

Removes the specified deployment administrator from the Dynamics 365 deployment.

Remove-CrmOrganization

Deletes the specified organization from the Dynamics 365 deployment.

Remove-CrmServer

Deletes the specified server from the Dynamics 365 deployment.

Set-CrmAdvancedSetting

Sets the specified advanced setting value for a Dynamics 365 deployment.

Set-CrmCertificate

Creates a certificate record or sets the properties of an existing certificate record in the Dynamics 365 configuration database.

Set-CrmProductKey

Sets the product key for the Dynamics 365 deployment.

Set-CrmSetting

Sets the specified Dynamics 365 deployment-wide settings.

Update-CrmOrganization

Updates the specified Dynamics 365 organization with the latest software updates or upgrades the organization to the latest available Dynamics 365 release.