Powershell 获取网站/get-webapplication关联目录
如果我想查找与IIS站点或应用程序关联的目录,我将如何查找Powershell 获取网站/get-webapplication关联目录,powershell,iis,Powershell,Iis,如果我想查找与IIS站点或应用程序关联的目录,我将如何查找 从Get-Website和Get-WebApplication中,我似乎找不到任何允许我这样做的对象属性。只要看看网站的成员: get-website -Name "Default Web Site" | Get-Member 返回: ... password NoteProperty System.String password= physicalPath
从
Get-Website
和Get-WebApplication
中,我似乎找不到任何允许我这样做的对象属性。只要看看网站的成员:
get-website -Name "Default Web Site" | Get-Member
返回:
...
password NoteProperty System.String password=
physicalPath NoteProperty System.String physicalPath=%SystemDrive%\inetpub\wwwroot
serverAutoStart NoteProperty System.Boolean serverAutoStart=True
...
这对我来说很明显:
(Get-Website -Name "Default Web Site").PhysicalPath
同样适用于应用程序:
(get-webapplication foo).PhysicalPath
我是完全失明的,我见过位置和路径属性,但不是那个。谢谢