Update DSC error: Modules property 'Modules' in metadata.json missing from zip

Hi Guys,

I’ve deployed xWebAdmintration module into my Azure Automation Asset. and successfully complie the dsc config and upload to Azure blob as REDemoWebsite.ps1.zip.

then I tried to apply an update dsc configuration of a test machine like below, but getting the following error:

Publisher
Microsoft.Powershell
Version
2.13.2.0
Status
Error
Message
The Modules property 'Modules' in metadata.json includes System.Collections.Hashtable, which is missing from the ZIP package

Detailed status:
[
  {
    "status": "Ready",
    "name": null,
    "message": null,
    "code": null,
    "operation": null
  },
  {
    "status": "Error",
    "message": "The Modules property 'Modules' in metadata.json includes System.Collections.Hashtable, which is missing from the ZIP package",
    "code": 1000,
    "name": null,
    "operation": null
  }
]

the script I run:

PS C:\Windows\system32> # Set the new configuration to the vm
$vm = Get-AzureVM -Name 'testvm001' -ServiceName 'DEMO'

$vm = Set-AzureVMDSCExtension -VM $vm -ConfigurationArchive 'REDemoWebsite.ps1.zip' -ConfigurationName 'REDemoWebsite'

$vm | Update-AzureVM

OperationDescription OperationId                          OperationStatus
-------------------- -----------                          ---------------
Update-AzureVM       783d43be-e5c4-725b-8547-ff10ed8db067 Succeeded      

Any suggestions or help will be appreciated.

Thanks,
Nick

Well, without sitting next to you to help troubleshoot it, this’ll be tough. But, the error message is telling you that the ZIP file is missing some of the required metadata - specifically, the “Modules” property. This has more to do with Azure itself than with PowerShell; the Azure back-end expects certain things to exist. In other words, this isn’t actually a PowerShell error, but something that Azure is generating and handing to PowerShell to hand to you. Unfortunately, I’m not personally familiar with this piece, so I can’t offer more help than this. Sorry!