Monday, September 12, 2011

Manage Dynamics CRM 2011 with PowerShell

With the beta of Dynamics CRM 2011, Microsoft offers the ability to script deployment management tasks with PowerShell.
The server role ‘Deployment Tools’ contains a set of PowerShell cmdlets to script Deployment Manager tasks.
After you have installed the Deployment Tools role you are able to add the Dynamics CRM PowerShell-Snap-In to your PowerShell session.
To use the cmdlets you have to enter following command into a PowerShell console, which adds the PowerShell-Snap-In to your active session.
Add-PSSnapin Microsoft.Crm.PowerShell
After this the CRM Snap-In will be listed when you enter this command
Get-PSSnapIn
Make sure that the result contains
Name : Microsoft.Crm.PowerShell
PSVersion : 2.0
Description : A Windows PowerShell snap-in containing cmdlets that manage components of Microsoft Dynamics CRM.
Now, you can view the cmdlets which are defined in the Snap-In with following command
Get-Command -Module Microsoft.Crm.PowerShell
At the moment of writing this post, following cmdlets are available
Disable-CrmOrganization
Disable-CrmServer
Edit-CrmOrganization
Enable-CrmOrganization
Enable-CrmServer
Get-CrmCertificate
Get-CrmDefaultOrganization
Get-CrmDeploymentAdministrator
Get-CrmEtmSettings
Get-CrmOrganization
Get-CrmServer
Get-CrmSetting
Get-CrmThrottleSettings
Import-CrmOrganization
New-CrmDeploymentAdministrator
New-CrmOrganization
Remove-CrmCertificate
Remove-CrmDeploymentAdministrator
Remove-CrmOrganization
Remove-CrmServer
Set-CrmCertificate
Set-CrmEtmSettings
Set-CrmSetting
Set-CrmThrottleSettings
Update-CrmOrganization
This is a great enhancement for managing a crm deployment. You can speed up your administrative tasks, if you add this Snap-In to your profile. See http://technet.microsoft.com/en-us/library/dd315342.aspx

No comments:

Post a Comment