Today I added the first version of the PowerShell Desired State Configuration (DSC) Module xSharePointAdministration to the Script Center. The module contains resources to configure and deploy SharePoint environments.
The current version has only limited resources. I will add more resources in the near future since I have some projects that will build upon the module. The goal is to provision a complete SharePoint farm using DSC so that you can easily deploy it to different environments – either in the cloud or on premise – and avoid the configuration shift that normally takes place after some time between test, staging and production environment.
I added the source code to GitHub. I do not store the entire module there. I decided to use a script (New-xSharePointAdministration.ps1) that uses the xDscResourceDesigne-Module to create the resource. I think this is easier, if you want to work in a repository and with test data. I created a resource for every possible scenario that I could thinks of: passing properties to the corresponding CmdLet from SharePoint (like xSite), working with server objects (like SPWeb in xList) and working with a complex mix of various PowerShell SharePoint CmdLets (like xFarmSolution). So it should be really easy to add more resources for other people. If you want to add your own resource and have problems getting everything up and running, please contact me and I will try to help.
The module currently contains the following resources:
|xSite||A resource to ensure, that a site collection (SPSite) is present or absent at a given URL.|
|xWeb||A resource to ensure, that a web site (SPWeb) is present or absent at a given URL.|
|xList||A resource to ensure, that a list (SPList) is present or absent at a given URL.
Note: Up to now the resource does not support the configuration of the list, it content types or fields. This will come in future versions.
|xFarmSolution||A resource to deploy a farm solution to a farm or web application. The farm solution contains a version number that is stored in the property bag of the solution to ensure a specific version.|
|xFeature||A resource to ensure that a feature is enabled or disabled at a given scope.|
You can find a detailed description in the description section of the description section of the script center.
Please let me know, what the most important resources are for you for future releases.