Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

AD LastLogon format date

$
0
0

I have a powershell script that extracts lastlogon across my domain.

The relevant portion of script is:-

 $time=$currentUser.LastLogon

$dt=[DateTime]::FromFileTime($time)

The output is in us format I think (eg

12/15/2011 16:08:20

however, I would like the date in uk format.

I understand the the culture can help, but I've not been able to get this to work with the above.

Any help, most appreciated.

Regards

Ian


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>