Quantcast
Viewing all articles
Browse latest Browse all 27852

'Add-WebConfiguration' Unexpected Token

Hello there,

I have just started getting my feet wet with using Powershell for IIS admin.

Below is the script where I am trying to add 'html' handler mapping for my website - `TestSite`

    Add-WebConfiguration IIS:/system.webserver/handlers
    -value @{name="TestSite_html"; path="*.html";
             executable="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"}
    -psPath "IIS:\Sites\TestSite"


However I am getting this error -  

    Add-WebConfiguration : Unexpected token
    Input: get-config("MACHINE/WEBROOT/APPHOST/TestSite")/IIS:/system.webserver/handlers
    Position: 51
    Length: 1


Can please guide what I am missing?

Thank you!


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>