“Resource group not found” when using PowerShell with Azure (especially DSC)

I have been banging my head against a wall wondering why my Azure PowerShell DSC commands like

Publish-AzureRmVMDscConfiguration  ".\MyDSCConfig.ps1" 
            -ResourceGroupName "VM-Training" -StorageAccountName "hmsvmtraindsc"

was failing with a “Resource Group not found“, even though other commands worked with that Resource Group and my current context.

The answer is do NOT use the x64 build of PowerShell or the “Windows PowerShell ISE”!

Use the x86 versions for now!

I found this advice at the bottom of this page https://azure.microsoft.com/en-us/blog/turn-on-windows-feature-using-dsc-cli/, and switching to the x86 ISE worked for me!

However, when I tried to reproduce the issue on the x64 ISE, the command worked fine??? However, by that time the Blob container had been created by the x86 version, so who know?

If I get time I will try to reproduce the error, otherwise please post a comment if the same thing happened to you.


Leave a Reply