有没有办法隐藏PowerShell中的输出?

时间:2015-12-17 17:45:13

标签: powershell

我想保留下面的所有代码,但我只想输出应用程序名称?我需要在输出中有where语句。是否有可能在" APPLICATION NAME:$ _之后隐藏任何内容的输出,以便我看不到$ Requirement的输出?

Write-output "APPLICATION NAME: $_ `r`n Requirement: $Requirement " | Where { $_ -notlike "*All_x64_Windows_10_and_higher_Clients*" }; 

1 个答案:

答案 0 :(得分:0)

我不熟悉PS,但有点搜索一下,这就是我想出来的。

写入输出("应用程序名称:$ _` r`n要求:$要求" |其中{$ _ -notlike" All_x64_Windows_10_and_higher_Clients &#34 ;})。split("`r`n")[0]

相关问题