小编Nit*_*esh的帖子

为什么Get-content支持-wait参数?

在Powershell V2中获取Get-content的帮助时,我找不到-Wait参数.虽然我可以将此参数与相同的cmdlet一起使用.这不是常见的参数之一.

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>]
Run Code Online (Sandbox Code Playgroud)

唯一的命令行开关我可以找到在Powershell V2中明确提到-Wait参数的地方 Start-process

get-content调用是否在引擎盖下启动?如何在Get-content中使用-Wait参数?

这可能有助于发现"帮助"中未提及的其他参数,但可以与该cmdlet一起使用.在此先感谢您的帮助!

parameters powershell powershell-2.0

1
推荐指数
1
解决办法
678
查看次数

标签 统计

parameters ×1

powershell ×1

powershell-2.0 ×1