【问题标题】:Get-Website command returning multiple websitesGet-Website 命令返回多个网站
【发布时间】:2012-11-09 23:08:21
【问题描述】:

在 PowerShell V3 中,我遇到了 Get-Website 命令问题。

每当我这样做时

PS c:\> Get-Website -Name "MyWebsite" 

它返回该服务器上的所有网站。要么是命令的行为不同,要么是我弄错了。

如果我对返回的对象执行 Get-type,则它是 Array 类型。如果我理解正确,那么它应该只返回一个网站。

请指教。

【问题讨论】:

标签: powershell iis-7


【解决方案1】:

显然bug link这个命令有个bug

用通配符包装名称可以:

  get-website -name "*MyWebsite*" 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-04-01
    • 2019-03-08
    • 1970-01-01
    • 2016-10-19
    • 2019-06-02
    • 1970-01-01
    • 2022-11-10
    相关资源
    最近更新 更多