PowerShell and the XRMCI infrastructure will be well used to deploy solutions, but the disadvantage is that for persistent or configuration data that cannot be added to the solution (or for elements of the solution that currently do not work in CRM 2015, for example, creation rules case, SLA Items, etc.). In this case, my client and I created powershell C # CmdLets that use the SDK and API to create persistent data, such as "Users", "Teams", "Members", "Queue Rules", "Case Creation Rules" (although it support is not supported, the API really allows) and configure mailboxes, etc.
Thus, in combination, the XRMCI infrastructure, C #, and PowerShell can be used to automate the deployment of one environment for the next. The key is to do this slowly, manually run the scripts to begin with and build trust in the process, configure and add additional elements. Once this trust is achieved, move on to integrating with TFS as a CI / CD process.
As for best practice, my own research shows that it’s still “the one who dares” without real “best practice”, over time, players like Chef, Puppet, Octopus and Microsoft (with DSC) will contribute, but presently....
source share