Help-Any Way to Create Desktop Shortcuts To Enable/Disable network?

Soldato
Joined
30 Mar 2010
Posts
13,245
Location
Under The Stairs!
Looking for help to enable upstairs PC running Steam/Discord/YT etc online, and downstairs to play Steam offline by manually disabling network in Device Manager-which is currently the way it's done.

Device_Manager_Disable-Enable_Network_Connection.png

Can you make dektop shortcuts to bypass Device manager?

Any guides/scripts/bat files/right click desktop to enable/disable network shortcuts that can make life easier?

Thanks in advance.:)
 
depends were you want it
Go to Network connections on your PC
Right click network adapter
create shortcut
It ask to add it to desktop
right click -> more options > disable

you could tweak windows to make that display on the main menu or copy it to quick launch if your on win10

or
  1. Open Start.
  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.
  3. Type the following command to identify the name of the adapter you want to disable and press Enter: Get-NetAdapter | format-table
  4. Type the following command to disable the Wi-Fi or Ethernet adapter and press Enter: Disable-NetAdapter -Name "YOUR-ADAPTER-NAME" -Confirm:$false
  5. Type the following command to enable the Wi-Fi or Ethernet adapter and press Enter: Enable-NetAdapter -Name "YOUR-ADAPTER-NAME" -Confirm:$false

    save that line to a .ps1 file to create a powershell script put it on your desktop
this might work not tested, to early :D but f its disabled renable, else disable it
  • Code:
    if (Disable-NetAdapter -Name "YOUR-ADAPTER-NAME"  -Confirm:$false) {
        "Enable-NetAdapter -Name "YOUR-ADAPTER-NAME"  -Confirm:$false
    }
    else {
        "Disable-NetAdapter -Name "YOUR-ADAPTER-NAME"  -Confirm:$false
    }
if i recall without -Confirm:$false, it popups with a dialog
 
Last edited:
I think you may have trouble with smogsy's powershell code, the double quotes at the start of the cmdlts shouldn't really be there. :)

If you've only got one network adapter in the machine this will probably work better...
Code:
$NetAdapter = Get-NetAdapter -Name *
if ($NetAdapter.Status -eq 'Up') {
    Disable-NetAdapter -InterfaceDescription $NetAdapter.InterfaceDescription -Confirm:$false
}
else {
    Enable-NetAdapter -InterfaceDescription $NetAdapter.InterfaceDescription -Confirm:$false
}
If you've got more than one adapter in the machine you'll have to replace the * at the end of the Get-NetAdapter -Name with something more unique.
 
I think you may have trouble with smogsy's powershell code, the double quotes at the start of the cmdlts shouldn't really be there. :)

If you've only got one network adapter in the machine this will probably work better...
Code:
$NetAdapter = Get-NetAdapter -Name *
if ($NetAdapter.Status -eq 'Up') {
    Disable-NetAdapter -InterfaceDescription $NetAdapter.InterfaceDescription -Confirm:$false
}
else {
    Enable-NetAdapter -InterfaceDescription $NetAdapter.InterfaceDescription -Confirm:$false
}
If you've got more than one adapter in the machine you'll have to replace the * at the end of the Get-NetAdapter -Name with something more unique.
double qoutes was was to show it needed to be changed
 
Back
Top Bottom