In Windows 7, you can use
wmic path win32_networkadapter where NetConnectionID="Local Area Connection" call disable
wmic path win32_networkadapter where NetConnectionID="Local Area Connection" call enable
Even in more details ( Start elevated Command Prompt ):
Get NIC list and index number
wmic nic get name, index
Enable NIC with index number (eg: 7)
wmic path win32_networkadapter where index=7 call enable
Disable NIC with index number (eg: 7)
wmic path win32_networkadapter where index=7 call disable
Here is the command in Windows XP:
netsh interface set interface name="Local Area Connection" admin=disabled
If the network name is not "Local Area Connection", substitute with the one you're using.
Reference: http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/enabledisable-network-interface-via-command-line/17a21634-c5dd-4038-bc0a-d739209f5081