I am creating a tool for our help desk to copy frequent resolution comments they may use when resolving tickets. I currently have:
Get-ChildItem ".\FileStore" | Out-GridView -PassThru -Title "Quick Notes" | Get-Content | Set-Clipboard
Which outputs something similar to (but in GridView):
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 15/11/2018 14:38 14 1.txt
-a---- 15/11/2018 14:39 14 2.txt
-a---- 15/11/2018 14:39 14 3.txt
-a---- 15/11/2018 14:39 14 4.txt
I am aiming to just have the Name column output, however I am unsure on how to achieve this. I have tried Select
, Select-Object
and Format-Table
which do not work, as I receive the following:
Get-Content : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of
the parameters that take pipeline input.
Is it possible to output only the Name column to the GridView?