LoginSignup
0
1

More than 5 years have passed since last update.

コマンドラインからネットワークアダプタを停止して、起動する

Posted at

コマンドラインからネットワークアダプタを停止して、起動する

論よりコード.

wmic PATH Win32_NetworkAdapter where "index = 4" call disable
wmic PATH Win32_NetworkAdapter where "index = 4" call enable

index は事前に wmic PATH Win32_NetworkAdapter を叩いて、対象のネットワークアダプタの InterfaceIndex の値をチェックしておく.
言うまでもなく管理者権限でコマンドプロンプトを起動してないと動かないので注意.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1