【问题标题】:Write an entire PowerShell property value to the console将整个 PowerShell 属性值写入控制台
【发布时间】:2015-03-06 23:31:25
【问题描述】:

Select-Object 目前正在截断结果,如下所示。

> Invoke-WebRequest "http://www.wikipedia.org" | select content

Content
-------
<!DOCTYPE html>...

我们如何将整个结果写入屏幕?

【问题讨论】:

    标签: powershell powershell-4.0


    【解决方案1】:

    选择命令将您的结果包装在具有单个“内容”属性的 powershell 对象中。只需告诉它返回扩展结果即可:

    Invoke-WebRequest "http://www.wikipedia.org" | select -ExpandProperty content
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-05
      • 1970-01-01
      • 1970-01-01
      • 2015-12-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多