Hi, I'm trying to cobble together a PS script to point all error pages from their default to an html page I've placed in a new VDir. I have little PS experience, but here's what I have found...
Import-Module WebAdministration dir "IIS:\Sites\Default Web Site" | % { Set-WebConfigurationProperty -Filter "/system.webServer/httpErrors/error[@statusCode='*']" - Location "IIS:\Sites\Default Web Site\$($_.name)" -Name /CustomErrors/HTTP533.html -Value "$($_.physicalPath)\CustomErrors\HTTP553.html" }
Running the script causes a prompt to ask, "Supply values for the following parameters: Name: Value:"
What am I missing?
Thanks