【发布时间】:2014-06-25 04:47:46
【问题描述】:
我目前正在使用以下 powershell 命令获取配额详细信息。
get-fsrmquota -Path "C:Temp\ID\1500-1"
这很好用。我正在尝试获取通配符路径来查找 ID 为 1500 的所有 ID。我尝试了以下命令集,但它们返回错误
get-fsrmquota -Path "C:Temp\ID\1500-*"
get-fsrmquota -Path "C:Temp\ID\1500-?"
get-fsrmquota -Path "C:Temp\ID\*1500-"
get-fsrmquota -Path "C:Temp\ID\?1500-"
我得到的错误如下,
0x80045306,指定路径无效
我有另一种方法,但它会遍历所有文件夹,然后过滤掉文件夹,这与遍历所有文件夹所花费的时间相同。
get-fsrmquota -Path "C:Temp\ID\..." | Where-Object {$_.Path - Like "C:Temp\ID\1500-*"}
我正在寻找另一种方法来获取相同 ID 的文件夹详细信息。
任何帮助将不胜感激。
谢谢。
【问题讨论】:
标签: powershell powershell-2.0 powershell-3.0 powershell-ise powershell-1.0