Summary: Use Windows PowerShell to pause the script while the Out-GridView displays.
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.)
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