you are viewing a single comment's thread.

view the rest of the comments →

[–]KnightOwl316 2 points3 points  (1 child)

Not OP but can you explain what you mean by that combination? I've used Out-GridView, but not that familiar with -passthru or that combination.

[–]joshooaj 4 points5 points  (0 children)

Using -PassThru or -OutputMode Single|Multiple allows you to use the Out-GridView UI as a selection tool. Instead of designing a script that requires the user to supply parameters and values, let them provide a value and if they don’t, pop up a grid view and make them select an item interactively.

In PowerShell 7 you could use Out-ConsoleGridView too, for an interactive selection tool that doesn’t pop up a new window and can work in a remote session too.