How to switch airplane mode in Windows 8 with CMD or PowerShell

After watching several messages on the Internet, I still can’t find a solution that will allow me to switch AirPlane mode for Windows 8 from CMD or PowerShell.

Does anyone have a solution that explicitly uses any of these options?

+6
source share
2 answers

I do not know how to switch the airplane switch. But you can easily turn off all your radio stations using powershell in Windows 8 using Network Adapters commands.

Use Get-NetAdapter to see all your adapters, bluetooth \ wifi \ ethernet

 Get-NetAdapter 

You can disable a specific adapter by index \ name \ description:

 Disable-NetAdapter -Name "Wi-Fi" 

Or you can just disable them all like this:

 Disable-NetAdapter * 

And put them back on

 Enable-NetAdapter * 

Note. You will need to run Powershell as an administrator to execute Disable-NetAdapter and Enable-NetAdapter

+7
source

More elegant solution:

 get-netadapter wi-fi | restart-netadapter 
+1
source

Source: https://habr.com/ru/post/959301/


All Articles