Setup DNS for Windows client

In this scenario we will be configuring DNS for our previous Windows VM on Hyper-V with our costume network adapter.

I've already shown how to do it through the GUI, but since we will be using Windows Server Core, we need to do it through PowerShell.

After installing Windows, log in as Administrator and run the following commands (this is according to our previously configured scenario, adapt it as you wish). This command will set the Domain's Controller IP as the default gateway, change its hostname and join it to the domain.

Get-NetIPInterface
New-NetIPAddress -InterfaceIndex 4 -IPAddress 192.168.100.2 -PrefixLength 24 -DefaultGateway 192.168.100.1
Set-DnsClientServerAddress -InterfaceIndex 4 -ServerAddresses 192.168.100.1
Rename-Computer "VM01" -Restart
Add-Computer -DomainName boxcreator.htb -Credential boxcreator\administrator
Restart-Computer

That's all!

Written by ruycr4ft

Last updated