Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 获取网站/get-webapplication关联目录_Powershell_Iis - Fatal编程技术网

Powershell 获取网站/get-webapplication关联目录

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

如果我想查找与IIS站点或应用程序关联的目录,我将如何查找


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

我是完全失明的,我见过位置和路径属性,但不是那个。谢谢