# Dropdown list - reports

**URL:** <https://forums.powershell.org/t/dropdown-list-reports/197>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/dropdown-list-reports/197 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/dropdown-list-reports/197/1 "2011-12-31T18:30:00Z")

</div>

by nowa at 2012-09-25 06:44:48

> Hi!  
>   
> I’m kinda new to powershell scripting but try to learn as i go.  
> I have made a powershell script who counts all our SPLA licenses based on group memberships and saves the report as a .xml with date so we can bring them back up in gridview by running " import-clixml _Filepath_ | out-gridview "  
>   
> I am looking for a easy way to open the reports without having to type inn the file-path to the specific file each time I want to check an old report. Like a PS script with a dropdown list of the files in my Report folder so I can choose the file to open in gridview.  
>   
> I have played around with this code for listing the files:  
> $Folder= "D:\Filer\SPLA"  
> $Files=Get-Childitem -Path $Folder  
>   
> But cant find a good way to get them into a dropdown list and make it work as a path in: "import-clixml | out-gridview "  
>   
> Anyone got a suggestion ?  
>   
> PS: Please ask if you need more backgound info on what I’m trying to do 🙂  
>   
> Regards,  
> Thomas Strand

by JeffH at 2012-09-25 06:50:27

> Are you trying to create a GUI prompt or something from the command line?

by nowa at 2012-09-25 06:53:06

> Yeah, something like that.  
>   
> I tried to adapt what i found here: [http://www.blkmtn.org/PowerShell-Window … P\_Launcher](http://www.blkmtn.org/PowerShell-Windows.Forms_RDP_Launcher)  
> but with no luck…

by JeffH at 2012-09-25 07:05:40

> If you have PowerShell v3, then use Out-GridView as your gui:  
>   
> dir \*.xml | Select Name,@{Name="Path";Expression={$\_.Fullname}} | out-gridview -PassThru | import-clixml  
>   
> I’m adding a Path property so that when you select the file in Out-Gridview and press OK, the object is piped to Import-clixml.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:03pm UTC](https://forums.powershell.org/t/dropdown-list-reports/197/2 "2024-05-16T21:03:49Z")

</div>

Closed on May 16, 2024, 9:03pm UTC


