Use the DSC Script resource to change the application pool identity

The Desired State Configuration (DSC) module xWebAdministration does not yet support changing the identity of an application pool. There is a community fork cWebAdministration that seems to support it –  but I have not tested it yet. What I did was to use the script resource to change the identity using the module WebAdministration. This is pretty straight forward so I just share the code here. Note that after changing the identity the state of the application pool is stopped. You can use the xWebAppPool resource to start it again. Continue reading Use the DSC Script resource to change the application pool identity

Configuring your SharePoint farm for DSC with xSharePointAdministration

Getting the xSharePointAdministration module to work has a lot of gotchas. So I decided to write a separate post for it. First of all: the xSharePointAdministration module uses the PSSnapin “Microsoft.SharePoint.PowerShell” for all its work. It therefore must be run on only one server in the farm – this would normally be the server that hosts the central administration. I will refer to this server as the deployment server. Make sure to do all the work on the deployment server. Desired state configurations are run by the Windows Management Instrumentation (winmgmt) service. This service normally runs under the “Local System” … Continue reading Configuring your SharePoint farm for DSC with xSharePointAdministration

Moving from PowerShell DSC to Release Management vNext DSC

If you’ve learned plain PowerShell Desired State Configuration (DSC) and then move to Visual Studio Release Management vNext there are a lot of gotchas that can cost you many hours or event days to figure them out. I thought I share some things I’ve learned the hard way to get people up and running more quickly. If you use plain DSC you normally have one structural configuration for the entire environment and an environment specific configuration that you change for each environment. Environment Configuration(Dev/Test/Prod) $TargetFolder = “C:\inetpub\wwwroot\Demo”$WebServerCount = 2 .psd1 Structural Configuration WindowsFeature IIS{    Name = “Web Server”    Ensure = … Continue reading Moving from PowerShell DSC to Release Management vNext DSC

Packaging DSC configurations for Visual Studio / TFS Release Management vNext

If you are using Visual Studio Release Management vNext to release your applications you’ll probably have DSC (Desired State Configuration) configurations that are shared between applications or provided by your operations team. In both cases they have a different lifecycle than your application and should be provisioned individually. But how do you publish PowerShell scripts or other files with the TFS build engine without creating empty solutions and adding the files? What you can do is to add a simple project file like TFSBuild.proj that calls a PowerShell script. This project file can be used in a team build. The … Continue reading Packaging DSC configurations for Visual Studio / TFS Release Management vNext