Powershell: can't generate current time in csv <pre><code>$timestamp = get-date -format "d-M-yyyy-H-mm" </code></pre> <p>I fill a csv file with lines, every line has <code>$timestamp</code> in first column and 3 other values.</p> <pre><code>#script actions1 $line = "$timestamp;value1;value2;value3" $line | out-file $file -encoding utf8 -append -force #script actions2 $line = "$timestamp;value1;value2;value3" $line | out-file $file -encoding utf8 -append -force </code></pre> <p>When I open the csv file, I see that every string has the same date and time which cannot be true. The csv sample looks like this:</p> <pre><code>"22-12-2014-12-00;value1;value2;value3" "22-12-2014-12-00;value1;value2;value3" "22-12-2014-12-00;value1;value2;value3" </code></pre> <p>How can i write the current time of each event in my log?</p>