Troubleshooting Network Issues

One of the problems with troubleshooting networking issues in Windows Server 2008 and Windows Vista is the large number of items that the operating system treats as network adapters.

To deal with this issue, use the GetActiveNicAndConfig.ps1 script. Begin with the param statement, as you often do, but instead of evaluating the value of the $computer variable as in previous scripts, this time set the default value of the $computer variable to be the name of the computer contained in the env: system variable. The rest of the param statement is similar to other scripts: Define a -help switch and a -full switch. This line of code is displayed here:

param($computer = $env:computername, [switch]$full, [switch]$help)

Define ...

Get Windows PowerShell™ Scripting Guide 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.