December 2nd, 2015

PowerTip: Use PowerShell to Build Simple Menu

Doctor Scripto
Scripter

Summary: Use the Out-Gridview cmdlet to easily build a GUI menu.

Hey, Scripting Guy! Question How can I easily build a GUI menu in Windows PowerShell so I can select items from a list?

Hey, Scripting Guy! Answer Pipe any array to the Out-Gridview cmdlet and you can capture the results!

‘AddUser’,’RemoveUser’,’DeleteUser’,’ExitSystem’ | Out-Gridview -passthru

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback