[英]List all IIS items via PowerShell Web Administration cmdlets
I am trying to bring back a list representative of an IIS website's structure using the Web Administration cmdlets . 我正在尝试使用Web Administration cmdlet来带回代表IIS网站结构的列表。 What I am after is what you see in the inetmgr (Internet Information Services Manager) treeview. 我所追求的是您在inetmgr(Internet信息服务管理器)树视图中看到的内容。 I see that there are cmdlets to Get-WebApplication and Get-WebVirtualDirectory , but how do I get plain old folders which may have been created under the root of the site? 我看到有一些Get-WebApplication和Get-WebVirtualDirectory的cmdlet ,但是如何获得可能是在网站根目录下创建的普通旧文件夹?
Is there some cmdlet that I am missing missing? 我缺少一些cmdlet吗? Is there a single cmdlet which will just retrieve all of these items as a collection and allow me to interrogate the type? 是否有一个cmdlet可以将所有这些项目作为一个集合来检索,并允许我查询该类型?
If you just want to interrogate the IIS listing of sites and go from there, you can always do: 如果您只想询问IIS站点列表并从那里访问,则可以始终执行以下操作:
cd IIS:\sites
dir
Then you can iterate each object for the physical path. 然后,您可以迭代每个对象的物理路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.