Add a collumn in output result using powershell

I need add a column in a output of command.

The comand run on a terminal service and get the status of users

$users = Invoke-Command -ScriptBlock {query user}

$users | Out-File c:\users.txt

The output of “query user” is:

USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME user1 rdp-tcp#1 272 Active 3 18/11/2016 04:09 user2 rdp-tcp#24 277 Active 1:59 18/11/2016 06:05

But I need include a collumn with the datetime when command is run, see:

USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME EXEC TIME user1 rdp-tcp#1 272 Active 3 18/11/2016 04:09 11:00 user2 rdp-tcp#24 277 Active 1:59 18/11/2016 06:05 11:00

I have tried to use “$users | Add-Member NoteProperty IName($fiel.Hour)” in command, but not works…

$scriptblock = 
(query user) -replace '\s{2,}',',' | ConvertFrom-Csv | 
Select-Object *,@{n='Exec Time';exp={Get-Date}} 

$users = Invoke-Command -ScriptBlock {$scriptblock}
$users | Out-File c:\users.txt

Yes, perfect.

I make a change on the script

$scriptblock = 
(query user)  | ConvertFrom-Csv | 
Select-Object *,@{n='Exec Time';exp={Get-Date}} 

$users = Invoke-Command -ScriptBlock {$scriptblock}
$users | Out-File c:\users.txt

Because I need the file continue with the original layout, and I want to write the results bellow the previous result in txt file.