How To Use Out-Gridview As A GUI In PowerShell
The Out-Gridview cmdlet sends output from a command, to grid view window that acts as an interactive GUI. The Gridview allows you to sort and filter your data. More importantly for our purposes, the cmdlet includes the -PassThru parameter. This allows us to select items from the table that we would like to pass down the pipeline to be used as input for other commands. Functionally, a built in GUI to allow data selection.
In this Snip we will demonstrate this functionality passing object to Start-Service and Stop-Service
Prerequisites include: - Windows PowerShell 5.1 - Visual Studio Code with PowerShell extension (optional)