如何在powershell中添加模块映射

时间:2014-08-09 23:20:02

标签: powershell iis

对PowerShell来说很新,到目前为止我所拥有的是这个并没有用。有什么想法吗?

Add-WebConfiguration system.webServer/handlers -Location $mySite -Name "html" -Modules "someModule" -Path ".html" -Type "System.Web.Handlers" -Verb "GET,HEAD"

1 个答案:

答案 0 :(得分:1)

PowerShell在线帮助非常好,Add-WebConfiguration

但是,我认为您想要使用WebHandler命令行开关,很可能是New-WebHandler

> New-WebHandler -Name "html" -Path "*.html" -Verb 'GET,POST' -Modules IsapiModule `
-PSPath $mySite

如果这对您不起作用,您可以查看Set-WebHandler

相关问题