Although I’m still troubleshooting and re-writing my previous posted re-usable function, here’s another one. And yes, this time I’ve tested it thoroughly
Whenever you get the date from a computer by using WMI, you will receive output such as:
Now this is just plain nasty… I don’t know of anyone that can read this without using a calculator… so how to convert this to “readable” output? I’ve written a small function to do just that
function WMI-DateStringToDate($lastboottime)
{ [System.Management.ManagementDateTimeconverter]::ToDateTime($lastboottime)
}
And by using this, one would get a proper and readable output:
Note: As you can see, I’ve got a system installed in my native language Dutch). So an English installed OS would give you some English output