IT Systems Engineering

Set Dynamic IP address using powershell

Here is a quick powershell script to set your network card TCP/IP setting to dynamic addressing:

$NICs = Get-WMIObject Win32_NetworkAdapterConfiguration | where{$_.IPEnabled -eq “TRUE”}

Foreach($NIC in $NICs)

{

$NIC.EnableDHCP()

$NIC.SetDNSServerSearchOrder()

}

IPConfig /all

 

Credits: Original script taken from here

Leave a Reply

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

Prove that you are a human *