【问题标题】:Get-ChildItem Powershell v3 missing parameterGet-ChildItem Powershell v3 缺少参数
【发布时间】:2016-02-04 23:46:45
【问题描述】:

从 powershell 窗口:$PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1

根据文档,V3 支持 Get-ChildItem 的 -File 参数。 https://technet.microsoft.com/en-us/library/hh847897(v=wps.620).aspx

当我运行时:Get-ChildItem -File -Recurse -Path $Path
其中 $Path 是一个包含有效文件夹路径的变量。

我收到一个错误: Get-ChildItem : 找不到与参数名称“文件”匹配的参数。

我在任何地方读到 v3 都支持这一点。我错过了什么?

【问题讨论】:

    标签: powershell-3.0


    【解决方案1】:

    https://technet.microsoft.com/en-us/library/hh849800.aspx

    这些是 v5.0 文档,但 -file 未作为 get-childitem 的参数列出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-04
      • 2011-02-22
      • 1970-01-01
      • 1970-01-01
      • 2019-02-17
      • 2021-08-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多