Windows 2012 Core – How to configure network card using Powershell

Reading Time: < 1 minute
  1. If you have multiple NIC’s you need to identify the name of the NIC. If you’re using a virtual server, disconnect all NICs apart from the one so it can be identified in the next step.
  2. Type Get-NetAdapter
  3. Make a note of your NIC name, for example Ethernet. If you have disconnected all other NICs, Ethernet should be the only one showing as UP
  4. Next, type the below command but amend to your IP address, Gateway and Subnet PreFix LengthNew-NetIPAddress -InterfaceAlias Ethernet -IPAddress -DefaultGateway -PrefixLength 24
  5. Press Enter
  6. To configure DNS entries, the command would be:Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddress,
  7. Press Enter
  8. Done

Please note, if copying the commands, you may need to reenter – and ” if the commands fail

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.