“The provided value for the template parameter is not valid” in ARM template deployments

I’ve come across this one before, but I hit it again today and I wanted to share the details of what happened. Basically the scenario is this, I have an ARM template that I want to deploy and it takes in parameters. The deployment needs to run through PowerShell using the Azure RM PowerShell cmdlets. When I call New-AzureRmResourceGroupDeployment I get the error that says “The provided value for the template parameter is {parameter name} not valid”, and this is where things start getting weird. Continue reading ““The provided value for the template parameter is not valid” in ARM template deployments”

Getting IDs to use with the Package DSC resource

One of the questions I get from customers who are looking at using the Package DSC resource to install MSI’s and executables is “What is the ProductID for the installer I want to run?”. If you look at the documentation the ProductID is meant to be a unique identified for the product you are installing, but how can you figure out what the correct value for any given installation is? Lucky for us you can actually use a little bit of PowerShell to look this up after you manually install the product once. Let me give you an example, I recently had to write a DSC script which would install SQL Server Management Studio 17.1 with DSC, so here is the approach I took. Continue reading “Getting IDs to use with the Package DSC resource”

Running Azure Automation runbooks from IFTTT tasks

I recently had an idea (ok lets call it ‘collaboratively came up with while talking to one of the grads in our office) to look at ways that I could trigger runbooks in my Azure Automation account from my phone. The specific issue we were looking to solve in this case was “how can I easily shut down all the VMs in my subscription from my phone if I forget to turn them off”. Now I already have a runbook that was scheduled to shut down the VMs every night at 11pm as a ‘just in case’ but surely there was a better way if I remembered before than to rely on that automation schedule. After a little bit of thought, the idea of create a “do button” from IFTTT (stands for “if this then that”, great little automation site that I recommend you check out if you haven’t used it already) seemed to be the perfect solution for me. So here’s a run through of the solution from start to end. Continue reading “Running Azure Automation runbooks from IFTTT tasks”

xSharePoint is now SharePointDsc – what you need to know!

For just over 12 months now we have been working hard to grow the xSharePoint DSC module to let SharePoint 2013 and 2016 administrators use PowerShell Desired State Configuration to manage their SharePoint deployments. We’ve come a long way in the last year, and now with the help of my core team we are making an important transition – we are renaming from “xSharePoint” to “SharePointDsc”. Continue reading “xSharePoint is now SharePointDsc – what you need to know!”

Better approaches to unit testing PowerShell scripts that call SharePoint cmdlets

For those who have come across my blog before you would have seen my recent post on how to unit test PowerShell scripts that call SharePoint cmdlets, which after I posted started a conversation between myself and Jakub JareŇ° (PowerShell MVP and Pester Owner) around the approach I had taken and some of the flaws in it. What ended up coming out of that was a much better approach to what I was doing, as well as a massive refactor of my entire test suite for the xSharePoint DSC resources – so I wanted to capture the approach here for anyone else who is interested. Continue reading “Better approaches to unit testing PowerShell scripts that call SharePoint cmdlets”