How can I add a column to an object in PowerShell?
For example, the Get-Childitem returns an object, with Mode, LastWriteTime, Length Name, etc.... And I want to extend this object with an extra column, that is computed from LastWriteTime.
This is original Get-Childitem output:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2012.12.15. 17:02 5390 Log_20121215.txt
-a--- 2013.01.02. 17:10 14014 Log_20130102.txt
-a--- 2013.01.07. 17:08 2200 Log_20130107.txt
And I want this output:
Mode LastWriteTime Length Name ComputedColumn
---- ------------- ------ ---- --------------
-a--- 2012.12.15. 17:02 5390 Telenor_Log_20121215.txt 20131215
-a--- 2013.01.02. 17:10 14014 Telenor_Log_20130102.txt 20140102
-a--- 2013.01.07. 17:08 2200 Telenor_Log_20130107.txt 20140207
Thanks for any help.