Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# ネットワークインターフェース確認
PS C:\Users\Administrator> Get-NetIPInterface -AddressFamily IPv4
ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
8 Ethernet0 2 IPv4 1500 15 Enabled Connected ActiveStore
1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStore
# DHCP オン (対象インターフェースは上記で確認した値)
PS C:\Users\Administrator> Set-NetIPInterface -InterfaceIndex 8 -Dhcp Enabled
# 設定確認
PS C:\Users\Administrator> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : RX-0
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : srv.world
Ethernet adapter Ethernet0 2:
Connection-specific DNS Suffix . : srv.world
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
Physical Address. . . . . . . . . : 00-0C-29-E5-F5-43
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::a059:4d4:4d2d:d93f%8(Preferred)
IPv4 Address. . . . . . . . . . . : 10.0.0.250(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, November 28, 2024 2:26:30 AM
Lease Expires . . . . . . . . . . : Friday, December 6, 2024 2:26:29 AM
Default Gateway . . . . . . . . . : 10.0.0.1
DHCP Server . . . . . . . . . . . : 10.0.0.101
DHCPv6 IAID . . . . . . . . . . . : 117443625
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-3A-ED-E0-00-0C-29-E5-F5-43
DNS Servers . . . . . . . . . . . : 10.0.0.101
NetBIOS over Tcpip. . . . . . . . : Enabled
|