LoginSignup
0
1

More than 5 years have passed since last update.

batで端末のネットワーク設定変更

Last updated at Posted at 2019-04-15

端末を別のネットワークに変更する場合、手動で変更するのはめんどくさい。
batファイル内にこちらを記載する。

@echo off
netsh interface ipv4 set address "イーサネット" static 192.168.254.10 255.255.255.0 192.168.254.1

batファイルを右クリックで「管理者として実行」すれば、一発でネットワークが変更される。
※1環境変数に追記すれば、ダブルクリックでも実行可能。
※2 "イーサネット"の部分の表記が端末によってことなる場合があるので、コマンドプロンプトでipconfigたたいて確認する。
例:イーサネット アダプタ イーサネット →イーサネット
  イーサネット アダプタ ローカルエリア接続 →ローカルエリア接続

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