Chapter 23. Controlling Your Network Configuration
In This Chapter
Taking charge of your network configuration
Getting friendly with the Win32_NetworkAdapterConfiguration WMI class
Interacting with the Windows Firewall using the HNetCfg.FwMgr COM object
Computers are pretty cool by themselves, but they show their true potential when they're networked. Have you ever been without Internet connectivity for a week? How about a day? Did you feel lost and disconnected from the world? No, this discussion isn't the prelude to an antidepressant drug commercial; I'm merely pointing out that getting online has become as important to people as having their morning coffee.
Network settings are often configured automatically through the use of a Dynamic Host Configuration Protocol (DHCP) server, which dishes out IP addresses and DNS addresses to requesting hosts such as your computer. This DHCP server functionality can exist in your home router that connects you to the Internet or, in corporate environments, run on servers. Either way, the result is the same: You plug in your Ethernet cable or set up your wireless connection, and your computer automatically gets the settings it needs to talk to other computers on your network and even out on the Internet.
In this chapter, you explore Windows PowerShell's ability to query and make changes to your network configuration. You also use the
HNnetCfg.FwMgr COM object to control the Windows Firewall.
Managing Your Network Settings
In some cases, you may want ...
Get Windows PowerShell™ 2 For Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.