共用方式為


Overview of Dynamics 365 Customer Engagement (on-premises) PowerShell

The Dynamics 365 Customer Engagement (on-premises) administration PowerShell module provides a set of cmdlets that you can use to manage Dynamics 365 Customer Engagement (on-premises) deployments.

The Dynamics 365 Customer Engagement PowerShell cmdlets are backward and forward compatible. For example, you can run the latest Dynamics 365 Customer Engagement (on-premises) Management PowerShell cmdlets against a Microsoft Dynamics CRM 2013 deployment.

Get started using the Dynamics 365 Customer Engagement (on-premises) administration PowerShell cmdlets

These 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.

This module works with on-premises versions of Dynamics 365 and Microsoft Dynamics CRM.

Register the cmdlets

  1. Sign in to the administrator account on your Microsoft Dynamics 365 server.

  2. Open a PowerShell command prompt.

  3. Enter the following command.

    Add-PSSnapin Microsoft.Crm.PowerShell

Provide your credentials to establish authentication

Running the following command will prompt you to type your user name and password to connect to the Dynamics 365 instance, and it will be stored in the $Cred variable that you can reuse in subsequent cmdlets.

$Cred = Get-Credential

Now, run the cmdlets to manage your on-premises deployment. More information: Microsoft.Crm.PowerShell Module

Additional PowerShell modules