Tuesday, March 10, 2015

Get OS Age in Days

$os = gwmi win32_operatingsystem
$os.ConvertToDateTime($os.installDate)
(new-Timespan $os.ConvertToDateTime($os.installDate)).Days

No comments: