Scenario : Trying to create a https website with DSC using Azure Automation Account. I get the below error. Did you face the same scenario? Any help will be great. HTTP bindings are working fine.
Windows 2012 R2
XWebAdministration Module version: 1.17.0.0
Error : PowerShell DSC resource MSFT_xWebsite failed to execute Test-TargetResource functionality with error message: Desired website bindings are not valid for website
DSC Node Config:
foreach ($Site in $Node.Sites)
{
xWebSite "$($Site.Name)WebSite"
{
Ensure = "Present"
Name = $Site.Name
ApplicationPool = "$($Site.Name)"
PhysicalPath = $Site.Path
State = 'Started'
DependsOn = "[xWebAppPool]$($Site.Name)AppPool"
BindingInfo = MSFT_xWebBindingInformation
{
Protocol = 'https'
Port = $Site.Port
CertificateStoreName = 'MY'
CertificateThumbprint = $(Get-ChildItem cert:\LocalMachine\My | where { $_.Subject -match "WMSvc" } | select -First 1).Thumbprint
}
}
DSC Configuration:
$data = @{
AllNodes = @(
@{
Sites = @(
@{Name="website1";Port="8643";Path="C:\inetpub\www\website1";Apps="App1","App2"}, @{Name="website2";Port="9643";Path="C:\inetpub\www\website2";Apps="App3","App4"})
})
}