New PowerShell Commandlets for Dynamics CRM

I am about to make your day a bit better. Steel yourself.
Over at the TechNet Gallery, Kenichiro Nakamura posted 66 new PowerShell commands for manipulating Dynamics CRM. I have not had time yet to go through all these, and I can see that not all of them are documented acurately, but I have spent many many hours coding C# CLI applications that do similar things, and I keep redoing them. Now there is a framework available to us for doing it, and it is MIT licensed (aka go change it). This makes me very happy.
Here are the 66 functions in the .psm1 file:
Add-CrmActivityToCrmRecordAdd-CrmMultiRecordAssociationAdd-CrmNoteToCrmRecordAdd-CrmRecordAssociationAdd-CrmSampleDataAdd-CrmSecurityRoleToTeamAdd-CrmSecurityRoleToUserConnect-CrmOnlineDiscoveryDisable-CrmLanguagePackEnable-CrmLanguagePackExport-CrmSolutionGet-CrmAllLanguagePacksGet-CrmEntityAllMetadataGet-CrmEntityAttributeMetadataGet-CrmEntityAttributesGet-CrmEntityDisplayNameGet-CrmEntityDisplayPluralNameGet-CrmEntityMetadataGet-CrmEntityNameGet-CrmEntityOptionSetGet-CrmEntityRecordCountGet-CrmEntityTypeCodeGet-CrmFailedWorkflowsGet-CrmGlobalOptionSetGet-CrmLicenseSummaryGet-CrmOrgDbOrgSettingsGet-CrmRecordGet-CrmRecordsGet-CrmRecordsByFetchGet-CrmRecordsByViewNameGet-CrmSiteMapGet-CrmSystemSettingsGet-CrmTimeZonesGet-CrmTraceAlertsGet-CrmUserMailboxGet-CrmUserSettingsGet-MyCrmUserIdImport-CrmSolutionInvoke-CrmRecordWorkflowInvoke-CrmWhoAmIMove-CrmRecordToQueueNew-CrmEntityReferenceNew-CrmMoneyNew-CrmOptionSetValueNew-CrmRecordPublish-CrmAllCustomizationPublish-CrmEntityRemove-CrmEntityMetadataCacheRemove-CrmRecordRemove-CrmRecordAssociationRemove-CrmSampleDataRemove-CrmSecurityRoleFromTeamRemove-CrmSecurityRoleFromUserRemove-CrmUserManagerSet-CrmActivityRecordToCloseStateSet-CrmRecordSet-CrmRecordOwnerSet-CrmRecordStateSet-CrmSystemSettingsSet-CrmUserBusinessUnitSet-CrmUserMailboxSet-CrmUserManagerSet-CrmUserSettingsTest-CrmSampleDataInstalledTest-XrmTimerStartTest-XrmTimerStop
Now breathe.
I have to highlight the couple I immediately think will change my world the most:
- By letting IT operations create new users with
New-CrmRecord, setting their defaults usingSet-CrmUserSettingsand giving them security roles usingAdd-CrmSecurityRoleToUserI can impose a regime where the people who control AD and in general identity management can also reach in to CRM and enforce. This is a stepping stone to using FIM/MIM fully integrated with CRM. Cool. Export-CrmSolutionandImport-CrmSolutionare actually PowerShell commandlets I already created myself, but I would rather build on something others also use instead of rolling my own. Maintenance time saved. Connect these to a build and deploy system (TeamCity and Octopus Deploy for example), and CRM is almost a second grade ALM citizen. Now we only need proper source control, patching, no-downtime-release and differencing for solution files natively.- DSC for CRM in general. A lot of these commands allow us to specify and test for a system end state when rolling out new environments. I see a bright future where we can install a new environment, provision language packs, import data and users and test the system - all automatically and by script. Unfortunately, DSC requires immutability, so you have to chain a couple of these together to achieve that, but it is so much closer than anything we have available elsewhere, like SSIS shapes and MSBUILD/C# frameworks. PowerShell is really the common language between dev and ops, so write new things in PS please.
Kudos to Kenichiro Nakamura and (Siri Harper for the tip); I owe you one.
EndOfLine
This was originally posted here.

Like
Report
*This post is locked for comments