title: How to get details from Registry using Powershell?
body: <p>How to get the value from registry for NTP Server.</p>
  
  <pre><code>$hklm = 2147483650
  $key = "SYSTEM\CurrentControlSet\Control\services\W32Time\Parameters"
  $value = "NtpServer"
  
  
  $wmi = get-wmiobject -list "StdRegProv" -namespace root\default 
  $wmi2 = ($wmi.GetMultiStringValue($hklm,$key,$value)).uvalue
  $wmi3 = ($wmi.GetStringValue($hklm,$key,$value)).uvalue
  $wmi2
  $wmi3
  </code></pre>
  
  <p>As you can see I tried GetMultiStringValue and GetStringValue but none of them are returning anything.</p>
  
  <p>I am not getting any error. If I check the value manually in registry then I can see the data there.</p>
  
  <p>What am I doing wrong? or Suggest me any alternate option.</p>