Checking and Changing your IP Address (v4) in Windows 10 and Windows Server 2019 in PowerShell and GUI

In our previous blog post we changed our server's computer name:

https://eyeteahero.blogspot.com/2019/05/checking-and-changing-your-windows-10.html

You can check and change your IP v4 address, subnet mask, default gateway and DNS servers in PowerShell or the GUI. A static IP address is important for servers as their IP addresses shouldn't change. DHCP is used to automatically assign IP addresses and subnet mask/default gateway/DNS values automatically but that is fine for workstations, not servers.


Before we begin make sure to set the network adapter to Bridged in VirtualBox so that it can share the internet connection from your host PC. I will be doing this for all VMs in this series. Single click your VM go to sSettings then Network then under Adapter select Bridged Adapter from the Attached to: drop down menu and click OK.


Checking and Changing your IP Address


PowerShell


Right click Start Menu and choose Windows PowerShell (Admin)

Type 


  • Get-NetIPAddress -AddressFamily IPv4
or

  • ipconfig /all
Take note of this information including InterfaceIndex. Servers should not use DHCP and should use static IP addresses.

To change this IP address to a static address using PowerShell issue the following cmdlets replacing the X's with the value of your choice

  • New-NetIPAddress -InterfaceIndex x -IPAddress x.x.x.x -PrefixLength xx -DefaultGateway x.x.x.x
To set the DNS servers type the cmdlet

  • Set-DnsClientServerAddress -InterfaceIndex x -ServerAddress x.x.x.x,x.x.x.x

GUI


To do the same thing in the GUI simply right click the Start Menu and go to Network Connections
Select the adapter you want to change on the left then click Change Connection Properties on the right
Right click the adapter you want to configure and choose properties
Single click IPv4 then click Properties
Enter the values that you want then click OK to apply them. Take note that this is also where you can enable and disable DHCP by clicking the Obtain IP Address/DNS Address Automatically radio buttons

Now that our server has a good computer name and static IP address let's move on to adding the ADDS role to the server in preparation for configuring out Active Directory Forest and Domain:

https://eyeteahero.blogspot.com/2019/05/adding-adds-active-directory-domain.html


Additional resources: