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?