Updated Version, with pipeline support is here.
I have been writing a number of reporting and audit scripts where there are a lot of potential properties that the user might want in the log file or report. It is hard to guess what items that they want in their report or in what order that they want them to appear. Select-PropertiesForm.ps1 was written to satisfy this need. I had a copy of the SAPIEN Technologies PrimalForms Community Edition which did the heavy lifting for the form. An example with the properties of a Nessus file looks like this:
The script takes the object as a required parameter and the title as an optional parameter. An example for AD User data:
#Example: Have user choose fields from Get-User
$obj = get-aduser -Filter ('sn -eq "Smith"') -properties *
#Call the Function with object as parameter
$Selected =Select-PropertiesForm $obj
$obj | select -Property $Selected |
Out-GridView -Title "User Info"
The user can move one or more objects between columns with the buttons. When they are satisfied, Accept List passes the selection of properties as an array which can be used by Select-Object.