title: Disable/Enable powershell with reg key
body: <p>I want to disable/enable powershell with reg key (if it is possible) to execute in cmd</p>
  
  <p>For example. If I want to disable/enable WSH, simply i run in cmd with privileged:</p>
  
  <pre><code>:: Disable WSH
  reg add "HKLM\Software\Microsoft\Windows Script Host\Settings" /v Enabled /t REG_DWORD /d 0 /f
  reg add "HKCU\Software\Microsoft\Windows Script Host\Settings" /v Enabled /t REG_DWORD /d 0 /f
  :: Restore WSH
  reg add "HKLM\Software\Microsoft\Windows Script Host\Settings" /v Enabled /t REG_DWORD /d 1 /f
  reg add "HKCU\Software\Microsoft\Windows Script Host\Settings" /v Enabled /t REG_DWORD /d 1 /f
  </code></pre>
  
  <p>How do I do this to disable/enable Powershell? (in Windows XP/7/8/8.1/10 x86 x64)</p>
  
  <p>Thanks</p>