How do you do a ‘Pause’ with PowerShell 2.0?

前端 未结 5 790
一生所求
一生所求 2020-12-07 10:27

OK, I\'m losing it. PowerShell is annoying me. I\'d like a pause dialog to appear, and it won\'t.

PS W:\\>>> $host.UI.RawUI.ReadKey(\"NoEcho,Include         


        
5条回答
  •  情歌与酒
    2020-12-07 11:24

    cmd /c pause | out-null
    

    (It is not the PowerShell way, but it's so much more elegant.)

    Save trees. Use one-liners.

提交回复
热议问题