PowerTip: Create Sortable GUI List of Files with PowerShell


Summary: Use Windows PowerShell to display a filterable GUI list of files.

Hey, Scripting Guy! Question How can I use Windows PowerShell to filter a list of files using a graphical user interface?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet to obtain a directory list, select all of the properties and pipe the output
           to the Out-GridView cmdlet, for example:

dir c:\fso | select * | ogv

Note  Dir is an alias for Get-ChildItem and ogv is an alias for Out-GridView.

Comments (1)

  1. Brad_Voris says:

    I haven’t used Out-GridView much but it is pretty nifty. Will start using it more frequently thanks!

Skip to main content