List all network adapters and connection with wmic
wmic nic get name,index
Enable lan adapter with wmic
wmic path win32_networkadapter where index=1 call enable
Disable lan adapter with wmic
wnuc path win32_networkadapter where index=2 call disable
To list all the network interface with command
netsh interface show interface
Enable lan adapter
netsh interface set interface name="Local Area connection" admin=enabled
Disable lan adapter
netsh interface set interface name="Local Area connection" admin=disabled
List Wifi profiles
netsh wlan show profiles
Connect to wifi profile
netsh wlan connect name="profile name"
No comments:
Post a Comment