문제

I attempt to run the Powershell command:

 Install-WindowsFeature DHCP

and get the message:

enter image description here

But if I attempt to create the static IP address, I get: enter image description here

Which I think is the result of not having DHCP installed.

도움이 되었습니까?

해결책

In Server Core installations a DHCP address is provided by default.

If you need to edit it, use these steps:

At a command prompt, type the following:

netsh interface ipv4 show interfaces

Make a note of the number shown in the Idx column of the output for your network adapter. If your computer has more than one network adapter, make a note of the number corresponding to the network adapter for which you wish to set a static IP address. At the command prompt, type:

netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP> mask=<SubnetMask> gateway=<DefaultGateway>

Where: ID is the number from step 2 above. StaticIP is the static IP address that you are setting. SubnetMask is the subnet mask for the IP address. DefaultGateway is the default gateway. At the command prompt, type:

netsh interface ipv4 add dnsserver name="<ID>" address=<DNSIP>index=1

Where: ID is the number from step 2 above. DNSIP is the IP address of your DNS server.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top