hotch-potch, Note to self

いろいろ作業記録

Hyper-V の有効・無効化切り替えコマンド

1.はじめに

Virtual BoxとWSL2を使い分けている関係で、簡単にHyper-Vの切替をする方法をまとめます。 ここでは、コマンドプロンプトの操作だけで切替をします。

2.操作方法

(1)

コマンドプロンプトを「管理者権限で実行」

(2)有効・無効状態の確認

bcdedit /enum | find "hypervisorlaunchtype"

(3)有効化

bcdedit /set hypervisorlaunchtype auto
shutdown.exe /r /t 0

(4)無効化

bcdedit /set hypervisorlaunchtype off
shutdown.exe /r /t 0

参考資料

Hyper-VのON・OFFを簡単に自動化すっぞ!! - Qiita

https://az764295.vo.msecnd.net/stable/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/VSCodeUserSetup-x64-1.54.3.exe