If you are doing any work at all with Dynamics CRM 2011 or 2013 you need to become a friend of PowerShell. Because PowerShell can be a really good friend who will save you much time and trouble.
There are several pre-packaged solutions to help you get started with PowerShell. Here are a few:
Dynamics CRM SDK
The SDK has several sample scripts in the SampleCode\ps folder that show you how to exercise the PowerShell commandlets that ship with Dynamics CRM 2011 and 2013.
Adxstudio ALM Toolkit
Is a Lifecycle Management for Microsoft Dynamics CRM Application Solutions with both free and commercial versions.
xRM CI Framework
Is a development and testing framework that contains several PowerShell components to aid in your development and deployment efforts.
Developing Your Own CommandLets
I have had great success developing my own PowerShell commandlets to perform functions that are customer or job-specific. Prior to PowerShell, I would have create a .NET Console application. By using PowerShell, I can create a single-use commandlet that I simply plug into my project that will give me the desired functionality.
In most cases, the code you write is fairly small and all you really need is to pass in a CRM OrganizationService object. I’ll have some posts in the future that describes how to do that.
In the meantime, to get you started, install this package:
PowerShell Tools for Visual Studio
This will give you some really cool PowerShell functionality within Visual Studio.
And visit this page for instructions on how to get starting writing your own:
Writing a Windows PowerShell Cmdlet