This code works. when I run it I get the following output: Friday, May 13, 2016 6:55:16 AM
$dt1=Get-Date
$dt1
This code works. when I run it I get the following output written to my .txt file
05/13/2016 06:39:14
$dt1=Get-Date
$msg1="Here is todays date :: $dt1"
$msg1 | Out-File'c:\windows\acme\logs\DateTest.txt'
Why the difference in the date format?