cmdで実行できるregキー(可能であれば)を使ってpowershellを無効/有効にしたいregキーでパワーシェルを無効/有効にする
たとえば、私はWSHを有効/無効にしたい場合は、単に私が特権を持つcmdをして実行します。
:: 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
私は無効にするには、この操作を行うにはどうすればよい/ PowerShellを有効にしますか? (WindowsのXP/7月8日/ 8.1/10のx86 x64の中)
おかげ
参照[PowerShellは、「スクリプトの実行が、このシステムで無効になっている。」と言う](http://stackoverflow.com/a/26955050) – wOxxOm
はすみません、私はリンクを見て、理解していないと私は」私の質問に関連しているかどうか不明で、私の質問は、キーのregを持つcmdのpowershellから外されています より具体的で手順を説明することができます。ありがとうございます – BrianC
PS実行ポリシーの可能な値を表示して説明しています。 googlableレジストリ/ GPOの例が簡単にあります:[1](https://codelucidate.wordpress.com/powershell/change-execution-policy-in-the-registry/)、[2](http://www.techrepublic .com/blog/the-enterprise-cloud/set-the-powershell-execution-policy-by-group-policy /)を使用します。 – wOxxOm