Select-Object with Out-GridView

PHOTO EMBED

Mon Jul 29 2024 02:25:10 GMT+0000 (Coordinated Universal Time)

Saved by @baamn #powershell #out-gridview

Get-ChildItem ".\FileStore" |
Select-Object Name, PSPath |
Add-Member -MemberType MemberSet `
           -Name PSStandardMembers `
           -Value ([System.Management.Automation.PSPropertySet]::new(
                      'DefaultDisplayPropertySet',
                      [string[]]('Name')
                  )) `
           -PassThru |
Out-GridView -PassThru -Title "Quick Notes" |
Get-Content | Set-Clipboard
content_copyCOPY

https://stackoverflow.com/questions/53323526/select-object-with-out-gridview