我在IIS 8.5中配置了几个重定向站点,现在想要列出它们。我尝试过:
.\appcmd.exe list site * -section:system.webServer/httpRedirect
但是使用 appcmd 命令时通配符无法正常工作。我也尝试了使用 WebAdministration 模块:
Get-WebConfiguration system.webServer/httpRedirect * | Get-Member destination
但这还不能满足我的需求,我需要的是一个包含站点和目的地两列的列表。