gpt4 book ai didi

powershell - get-website/get-webapplication关联目录

转载 作者:行者123 更新时间:2023-12-04 16:59:36 25 4
gpt4 key购买 nike

如果我想找到与IIS站点或应用程序关联的目录,我该怎么做?

我似乎无法从Get-WebsiteGet-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

关于powershell - get-website/get-webapplication关联目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30488308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com