April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Add A DHCP 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

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>