10.1. Viewing the Network Configuration

Problem

You want to view the network configuration of a server, including a list of all installed network adapters.

Solution

Using a graphical user interface

  1. From the Control Panel, open the Network Connections applet.

  2. Open the network connection for which you want to view the settings.

  3. Click the Properties button.

  4. Click the Configure button to view network adapter properties. Or double-click Internet Protocol (TCP/IP) to view network configuration settings.

Using a command-line interface

To view the list of connections and network configuration on the local machine, run the following command:

> ipconfig /all

To view this information on a remote machine, use the Sysinternals psexec command:

> psexec \\<ServerName> -u administrator -p MyPass ipconfig /all

Another command you can use to view network configuration information is netsh, as shown here:

> netsh int ip show config

Using VBScript

' This code displays the network configuration for all connections. ' ------ SCRIPT CONFIGURATION ------ strComputer = "." ' ------ END CONFIGURATION --------- set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colNAs = objWMI.InstancesOf("Win32_NetworkAdapter") for each objNA in colNAs Wscript.Echo objNA.Name Wscript.Echo " Description: " & objNA.Description Wscript.Echo " Product Name: " & objNA.ProductName Wscript.Echo " Manufacturer: " & objNA.Manufacturer Wscript.Echo " Adapter Type: " & objNA.AdapterType Wscript.Echo " AutoSense: " & objNA.AutoSense ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.