I have a laptop running Windows Server 2003 SP2, with PowerShell installed.
Occasionally, this system has to be used in environments where it needs the NIC manually set to 100 Mbps/Full Duplex in order to function correctly. In most other environments, this needs to be set to Auto-detect for best performance.
Normally, I do this through the following procedure:
- Right-click My Network Places, select Properties.
- Right-click Local Area Connection, select Properties
- Click Configure
- On the Advanced tab, select the Speed & Duplex property and change the Value from Auto to 100 Mb Full.
- Reverse the change when done with work.
Is there a way to do this via Batch or PowerShell scripting? I'm looking to do something like this:
@ECHO OFF
[Insert 100 Mbps/Full Duplex commands here]
ECHO NIC set to 100 Mbps/Full Duplex
ECHO Press any key to return to Auto-Detect
PAUSE
[Insert Auto-Detect commands here]
ECHO NIC returned to Auto-Detect
ECHO Press any key to exit
PAUSE
I've been told there may be some methods to do this via WMIC or PowerShell, but I haven't been able to find the proper switches, values, or syntax.