Moving Azure VM’s with managed disks to new subscription

One of the things that I’ve come up against recently is a limitation with managed disks. Today it was specifically when it comes to moving virtual machines that use them into a new subscription. In short, it’s not doable – the currently documented limitations of managed disks state that this isn’t possible. However there is a workaround – but it does take a little bit of legwork to do. I’ll run you through the process I followed here though.
Continue reading “Moving Azure VM’s with managed disks to new subscription”

Using the launch.json file in VS code for improved PowerShell debugging

Anyone that has talked to me recently about how I write PowerShell scripts will know that Visual Studio Code is my new one and only! You can write PowerShell scripts in there and hit F5 to have a similar debugging experience to what you would get in PowerShell ISE – but did you know that you can extend that to make it easier to debug and test different scenarios from within VS Code? If the answer to that is no, then read on! Continue reading “Using the launch.json file in VS code for improved PowerShell debugging”

“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”

Adding additional intellisense to VS Code when editing PowerShell scripts

Most people that I talk to about my experiences writing PowerShell scripts these days will know that Visual Studio Code is my absolute preference for editor these days. It’s a great tool with lots of little tricks to help you improve your productivity – and recently I came across another one to help when I work on SharePoint related scripts for SharePointDsc, and this is how I add intellisense for SharePoint PowerShell cmdlets when I’m authoring scripts on my laptop (which doesn’t have SharePoint installed on it). Continue reading “Adding additional intellisense to VS Code when editing PowerShell scripts”

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”