Wednesday, 27 June 2018

Configure IPv4 IP Address, DNS servers and DNS Suffix from within Powershell

I recently used this on a Hyper-V build.  It should provide enough network connectivity to add your server to the Active Directory domain.

Find connected NICs and interface names





Configure IP address


New-NetIPAddress -InterfaceAlias "NIC1" -IPAddress -AddressFamily IPv4 -PrefixLength 24 -DefaultGateway



Configure DNS Servers



Set-DnsClientServerAddress -InterfaceAlias "NIC1" -ServerAddresses



Configure the suffix search list



Set-DnsClientGlobalSetting -SuffixSearchList




No comments:

Post a Comment