【发布时间】:2014-06-04 10:03:26
【问题描述】:
在 Powershell V2 中通过 Get-content 的帮助时,我找不到 -Wait 参数。虽然我可以将此参数与相同的 cmdlet 一起使用。这肯定不是 commonParameters 之一。
NAME
Get-Content
SYNOPSIS
Gets the content of the item at the specified location.
SYNTAX
Get-Content [-LiteralPath] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Force
] [-Include <string[]>] [-ReadCount <Int64>] [-TotalCount <Int64>] [-UseTransaction] [<CommonParameters>]
Get-Content [-Path] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Force] [-Inc
lude <string[]>] [-ReadCount <Int64>] [-TotalCount <Int64>] [-UseTransaction] [<CommonParameters>]
我能找到的唯一命令行开关在 Powershell V2 中明确提到 -Wait 参数是 Start-process
get-content 是否在后台调用 Start-process?如何将 -Wait 参数与 Get-content 一起使用?
这可能有助于发现帮助中未提及但可与该 cmdlet 一起使用的其他参数。 提前感谢您的帮助!
【问题讨论】:
-
它有它的用途,请在此处查看 Ed 的文章。 blogs.technet.com/b/heyscriptingguy/archive/2013/02/24/…
-
艾德简直太棒了!虽然问题是关于为什么我能够使用等待,但它没有记录在帮助中。如果还有其他参数在帮助中没有提到,但可以使用。
标签: powershell parameters powershell-2.0