1.コマンドラインからネットワークインターフェイスの名前を変更します
netsh interface ip show interfaces
netsh interface set interface name = "ローカルエリア接続5" newname = "iSCSI1"
2. IP / GW / DNSを構成します
IP / GWの設定:
netsh interface ip show interfaces
netsh interface ip set address "Ethernet0 2" source = static 10.24.101.19 255.255.0.0 10.24.255.254
DNSの設定:
netsh interface ip set dnsservers "Ethernet0 2" static 10.110.1.13
2番目のDNSを追加します:
netsh interface ip add dnsservers "Ethernet0 2" 10.110.1.14
2番目のIPを追加します:
netsh interface ip add address "Ethernet0 2" 10.24.101.18 255.255.0.0
3.PowerShellを使用してIPv6を無効にする
Get-NetAdapterBinding -ComponentID ms_tcpip6
Disable-NetAdapterBinding -Name "Ethernet0 2" -ComponentID ms_tcpip6
ワイルドカード*を使用して、すべてのネットワークアダプターでIPv6を1つずつ無効にする代わりに無効にすることができます。
無効化-NetAdapterBinding-Name "*" -ComponentID ms_tcpip6
IPv6を再度有効にする必要がある場合は、次のコマンドを実行するだけです。
Enable-NetAdapterBinding -name * -ComponentID ms_tcpip6
4.CMDを使用してPowerShellスクリプトを実行します
Powershell.exe -noexit "&" "c:\ temp \ aa.ps1" ""