如何列出所有IIS应用程序及其默认页面

时间:2018-11-07 23:36:26

标签: iis

我是IIS的新手,并且想查看服务器中正在运行的所有Web应用程序的列表,包括其默认页面。

我尝试过类似的事情

appcmd list app

,但仅显示所有没有默认页面的应用程序:

APP "Default Web Site/" (applicationPool:DefaultAppPool)
APP "Default Web Site/App1" (applicationPool:App1)
APP "Default Web Site/App2" (applicationPool:App2)

我也尝试过

Get-WebConfigurationProperty -Filter /system.webServer/defaultDocument/files/add -PSPath "IIS:\sites\Default Web Site" -Name value | Select value

但是它仅在默认网站上显示主页。

我尝试在默认网站之后添加*:

Get-WebConfigurationProperty -Filter /system.webServer/defaultDocument/files/add -PSPath "IIS:\sites\Default Web Site/*" -Name value | Select value

但它仅列出页面,例如index.html,default.aspx

我期望像

http:/localhost/App1/index.html
http:/localhost/App2/default.aspx
etc...

我可以在powershell / cmd中实现此功能,因为我会将列表导出到文本文件中?

0 个答案:

没有答案