Cannot bind argument to parameter 'Filter' because it is null
Hi,
When using the xWebApplication resource I get the following error:
Cannot bind argument to parameter 'Filter' because it is null
When looking at the errors in the Event Viewer, I can find the following:
This event indicates that a non-terminating error was thrown when DSCEngine was executing Set-TargetResource on MSFT_xWebApplication DSC resource. FullyQualifiedErrorId is ParameterArgumentValidationErrorNullNotAllowed,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand. Error Message is Cannot bind argument to parameter 'Filter' because it is null..
MIResult: 1 Error Message: Destination element already exists, please use "force" parameter to override. Message ID: Destination element already exists, please use "force" parameter to override.,Microsoft.IIs.PowerShell.Provider.NewWebApplicationCommand Error Category: 5 Error Code: 5 Error Type: MI
The DSC configuration block I built looks like the following:
WindowsFeature WebServer {
Ensure = "Present"
Name = "Web-Server"
}
File "$($Instance)CommonFolder" {
DestinationPath = "C:\inetpub\wwwroot\$($Instance)\Services\Common"
Type = "Directory"
}
xWebAppPool "$($Instance)CommonAppPool" {
Name = "$($Instance)_Common"
Ensure = "Present"
State = "Started"
autoStart = $true
startMode = "OnDemand"
loadUserProfile = $false
}
xWebApplication "$($Instance)CommonApplication" {
Name = "$($Instance)/Services/Common"
WebAppPool = "$($Instance)_Common"
Website = "Default Web Site"
PhysicalPath = "C:\inetpub\wwwroot\$($Instance)\Services\Common"
Ensure = "Present"
AuthenticationInfo = MSFT_xWebApplicationAuthenticationInformation {
Anonymous = $true
Basic = $false
Digest = $false
Windows = $true
}
DependsOn = "[xWebAppPool]$($Instance)CommonAppPool", "[WindowsFeature]$($Instance)WebServer", "[File]$($Instance)CommonFolder"
}
Is there any workarround for this Bug?