Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,176 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Any DSC configurations which I try to run which rely on the PSDscResources module fail with the following error. This happens if I use the default Azure 2.9.0 version, or the updated 2.12.0 version. This happens with code that compiled properly on November 26th, and with new code. Removing the PsDscResources related code, everything compiles properly:
Exception calling "NewScriptBlock" with "1" argument(s): "At line:4 char:5 + Import-DscResource -ModuleName PSDscResources + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exception parsing MOF file 'C:\Modules\Global\PSDscResources\DSCResources\MSFT_WindowsPackageCab\MSFT_WindowsPackageCab.Schema.mof':The given key was not present in the dictionary.." (At line:44 char:5 + Import-DscResource -ModuleName PSDscResources + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exception parsing MOF file 'C:\Modules\Global\PSDscResources\DSCResources\MSFT_WindowsPackageCab\MSFT_WindowsPackageCab.Schema.mof':The given key was not present in the dictionary..)
The DSC Configuration is simple:
Configuration Test
{
Import-DscResource -ModuleName "NetworkingDSC"
Import-DscResource -ModuleName "PSDscResources"
node localhost {
WindowsFeature FeatureToRemove {
Ensure = "Absent"
Name = "FS-SMB1"
}
NetIPInterface DisableDHCPPrimaryNIC {
InterfaceAlias = "Ethernet 2"
AddressFamily = "IPv4"
DHCP = "Disabled"
}
}
}
This started working with no changes on my side.