PowerTip: Cause Out-GridView Cmdlet to Pause

Doctor Scripto

Summary: Use Windows PowerShell to pause the script while the Out-GridView displays.

Hey, Scripting Guy! Question How can I pause the execution of my Windows PowerShell script while the Out-GridView cmdlet displays a grid view?
           (I do not need to pass information from the grid to the script.)

Hey, Scripting Guy! Answer The –Wait parameter from the Out-GridView cmdlet will pause script execution while the grid displays.
           Here is an example:

Get-Process | select name, id | Out-GridView -Wait


Discussion is closed.

Feedback usabilla icon