Most IT pros are very familiar with setting and using the Windows Control Panel, and more lately the Windows Settings to configure a system's IP configuration (IP address, subnet mask, default gateway and DNS server) and to change a statically configured system to one that gets its configuration from DHCP. Savvy admins also were able to use the network shell, Netsh.exe to set the IP configuration details. In this recipe, we show how you do it with PowerShell and native cmdlets.
Configuring IP addressing
Getting ready
You run this recipe on server DC2. Server DC2 is a newly installed VM (or physical machine) whose NICs are default to DHCP. When DC2 boots up, it attempts to contact the DHCP server for IP address configuration...