moduleVersion does not seems to be doing anything (WMF 5)
code
ensure two versions of the same module is installed
Install-Module xWebAdministration -Version 1.13.0.0 Install-Module xWebAdministration -RequiredVersion 1.11.0.0
run this basic dsc config
Configuration TestDSCVersion {
Import-DscResource -ModuleName xWebAdministration -ModuleVersion 1.11.0.0
node ("localhost")
{
xWebAppPool ScooplaApplicationPool
{
Ensure = 'Absent'
Name = "asdfasdf"
}
}
}
TestDSCVersion
the output of the mof file is:
instance of MSFT_xWebAppPool as $MSFT_xWebAppPool1ref
{
ResourceID = "[xWebAppPool]ScooplaApplicationPool";
Ensure = "Absent";
SourceInfo = "C:\\Dev\\Scoopla.Dev\\ModuleVersion.ps1::14::5::xWebAppPool";
Name = "asdfasdf";
ModuleName = "xWebAdministration";
ModuleVersion = "1.13.0.0";
ConfigurationName = "TestDSCVersion";
};
ModuleVersion = “1.13.0.0”; instead of ModuleVersion = “1.11.0.0”