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
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
6 Ethernet0 IPv4 1500 25 Disabled Connected ActiveStore
1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStore
# DHCP オン (対象インターフェースは上記で確認した値)
PS C:\Users\Administrator> Set-NetIPInterface -InterfaceIndex 6 -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:
Connection-specific DNS Suffix . : srv.world
Description . . . . . . . . . . . : Intel(R) 82574L Gigabit Network Connection
Physical Address. . . . . . . . . : 00-0C-29-E5-F5-43
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::d4fb:211a:70f:b69d%6(Preferred)
IPv4 Address. . . . . . . . . . . : 10.0.0.250(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, December 23, 2021 10:57:12 PM
Lease Expires . . . . . . . . . . : Friday, December 31, 2021 10:57:12 PM
Default Gateway . . . . . . . . . : 10.0.0.1
DHCP Server . . . . . . . . . . . : 10.0.0.101
DHCPv6 IAID . . . . . . . . . . . : 100666409
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-3A-ED-E0-00-0C-29-E5-F5-43
DNS Servers . . . . . . . . . . . : 10.0.0.10
NetBIOS over Tcpip. . . . . . . . : Enabled
|