I’m currently having an issue with a package resource not applying to a server in my DSC config.
Config can be found below:
Configuration DSCIISInstallation
{
param ($MachineName)
Node $MachineName
{
{Package 'Webdeploy Tool'
{Name = 'Webdeploy Tool'
Path = 'C:\tmp\\Webdeploy\WebDeploy_2_10_amd64_en-US.msi'
ProductId = '88453A48-740B-4F33-8BF0-E15489874D4C'
Ensure = "Present"
Arguments = "ADDLOCAL=MSDeployFeature,MSDeployAgentFeature"
LogPath = 'C:\tmp\log.txt'
}
}
}
#Install the IIS Role
foreach ($Feature in $WebserverConfig )
{WindowsFeature “$Feature$Number”
{
Ensure = ‘Present’
Name = $Feature
}
}
{WindowsFeature ‘Web-Net-Ext’
{
Ensure = ‘Present’
Name = Web-Net-Ext
Source = ‘\Server\Microsoft\WindowsSrv2012R2\Sources\sxs’
}
}
{WindowsFeature 'Web-ASP-Ext'
{
Ensure = 'Present'
Name = Web-ASP-Ext
Source = '\\Server\Microsoft\WindowsSrv2012R2\Sources\sxs'
}
}
{WindowsFeature 'Net-Framework-core'
{
Ensure = 'Present'
Name = Net-Framework-core
Source = '\\Server\Microsoft\WindowsSrv2012R2\Sources\sxs'
}
}
{WindowsFeature 'Net-Framework-Features'
{
Ensure = 'Present'
Name = Net-Framework-Features
Source = '\\Server\Microsoft\WindowsSrv2012R2\Sources\sxs'
}
}
}
$WebserverConfig = @(‘Web-Server’,‘Web-WebServer’,‘Web-Common-Http’,‘Web-Default-Doc’,‘Web-Dir-Browsing’,
‘Web-Http-Errors’,‘Web-Static-Content’,‘Web-Http-Redirect’,‘Web-Health’,‘Web-Http-Logging’,‘Web-Performance’,
‘Web-Stat-Compression’,‘Web-Security’,‘Web-Filtering’,‘Web-Windows-Auth’,‘Web-App-Dev’,
‘Web-Net-Ext45’,‘Web-ASP’,‘Web-Asp-Net45’,‘Web-ISAPI-Ext’,‘Web-ISAPI-Filter’,‘Web-Mgmt-Tools’,
‘Web-Mgmt-Console’,‘NET-Framework-45-Features’,‘NET-Framework-45-Core’,
‘NET-Framework-45-ASPNET’,‘NET-WCF-Services45’,‘NET-WCF-TCP-PortSharing45’,‘Web-Mgmt-Service’)
The entire array of web stuff install fine. The package i want to deploy does not, I sadly do not have anymore information as it seems that DSC is not outputting anything in regards to this package.
Does it has something to do with the foreach loop? Also, as a bit of a side question, does it actually matter if i use single or double-quotes in DSC? i know in normal Powershell, the single quote is interpreted as flat text, so I was wondering if this has any effect in the DSC configurations?