title: Read Registery value and convert to date
body: <p>I am trying to find the uptime of windows machine (last shutdown time) using following code:</p>
  
  <pre><code>$computernames = gc LegAservers.txt
  foreach ($computername in $computernames) {
    $baseKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine",$computername)
    $sKey = "System\CurrentControlSet\Control\Windows"
    $key = $baseKey.OpenSubKey($sKey)
    $kvalue = $key.GetValue("ShutdownTime")
    $kvalue
    "------------------------------------------"
    $baseKey.Close()
  }
  </code></pre>
  
  <p>Output is:</p>
  
  <pre class="lang-none prettyprint-override"><code>13
  152
  105
  75
  132
  217
  208
  1
  ------------------------------------------
  </code></pre>
  
  <p>I am unable to covert this <code>$kvalue</code> in <code>DateTime</code> format using:</p>
  
  <pre><code>[DateTime]::FromFileTime($kvalue)
  </code></pre>
  
  <p>Please suggest proper way to convert <code>$kvalue</code> in date and time format so that it can be understood by user.</p>