Don’t forget the NodeName in your DSC ConfigurationData

Today I created a new configuration data for a DSC configuration and got the following error: all elements of AllNodes need to be hashtable and has a property ‘NodeName’. The config looked good: AllNodes was a hashtable and it had the desired node name. So where was the error? I forgot one little thing: the global configuration needs a property NodeName set to an asterisk. Adding this fixed the error. This is really easy – but a search for the error message did not return any useful results. Therefor I decided to share it anyway… Continue reading Don’t forget the NodeName in your DSC ConfigurationData

Be careful with custom variable names in Release Management

If you use Visual Studio Release Management vNext / 2013 with PowerShell/DSC you probably have a lot of custom configuration variables that you pass to your scripts. Be careful when you choose the names for these variables because! There are a lot of reserved words. For example the word UserName is reserved. This leads to very odd error messages that are really hard to track down: System.AggregateException: One or more errors occurred. —> Microsoft.TeamFoundation.Release.Common.Helpers.OperationFailedException: Permission denied while trying to connect to the target machine <hostname> on the port:5985 via power shell remoting. Please check the following link for instructions: http://go.microsoft.com/fwlink/?LinkID=390236System.Management.Automation.Remoting.PSRemotingTransportException: … Continue reading Be careful with custom variable names in Release Management

xSharePointProvisioning Module – PowerShell Desired State Configuration (DSC)

The xSharePointProvisioning module contains DSC resources to provision SharePoint artifacts using the Client Side Object Model (CSOM). There are two versions: one for O365 and ne for SharePoint on premise. Currently the following resources are in the package: xList Ensure a list with a specific title and description at a given URL. If the list does not exist it will be created with the specified template. xField Ensure that a list at a specific url has or has not a specified field. XListItem Ensure that a list at a specific url has or has not a list item with the … Continue reading xSharePointProvisioning Module – PowerShell Desired State Configuration (DSC)

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