Let’s say I’d like to divide data and configuration and I’d love to sites binding info in DSCConfigurationdata file, separately from DSC configuration like that:
xWebsite xWebsite1
{
Name = "site.name.com"
ApplicationPool = "site.name.com"
Ensure = "Present"
PhysicalPath = "C:\Inetpub\wwwroot\site.name.com"
State = "Started"
BindingInfo = $Node.BindingInfo
}
and DSCConfigurationdata file will contain something following:
BindingInfo = @(
@{
Protocol = "HTTP"
Port = 80
IPAddress = "1.1.1.1"
HostName = "site.name.com"
},
@{
Protocol = "HTTPS"
Port = 443
IPAddress = "1.1.1.1"
HostName = "site.name.com"
CertificateThumbprint = "54634563456345"
CertificateStoreName = "WebHosting"
}
)
But since BindingInfo should be of type [CimInstance]] and this is specific CIM instance defined resource I can instantiate it and create an array of elements of CimInstance (actually MSFT_xWebBindingInformation class).
So can anybody please can help me on how to achieve that.
Thanks in advance.