If you are experiencing this error: "Extension with publisher 'Microsoft.Powershell', type 'DSC', and type handler version 'x.x' could not be found in the extension repository" it is because Microsoft just pulled the cord on PowerShell DSC extension v1.x up to v2.3 a couple of days ago.
And the reason is:
Today we retired versions 1.0 to 2.3 of the Azure DSC Extension. These versions use preview versions of WMF 5.0 whose signing certificates have expired, so it is no longer possible to install them.
This article apply only to Microsoft.Powershell DSC extension and NOT for Microsoft.OSTCExtensions DSCForLinux.
The recommended approach is to upgrade your scripts or templates to v2.4 or latest version (v2.8 is the latest version at the time of writing this).
PowerShell
You can be explicit and use the Version
parameter to specify the version to use instead of the default one coded in the PowerShell cmdlet version you are using.
Set-AzureVMDscExtension -Version 2.8 …
ARM Templates
There is no "useLatestVersion" option for ARM templates, the nearest thing you can use is the autoUpgradeMinorVersion
property, this will automatically upgrade your extension to the latest minor version available. ie: If you were using v2.1, using this setting will enable v2.* but not v3.0
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.8",
"autoUpgradeMinorVersion": "true",
…
}
Important: If you choose to use autoUpgradeMinorVersion property, be aware that when they release a new version with a new WMF your VM will be rebooted once during the upgrade.