8

After reviewing multiple posts on the internet, I still cannot find a solution that will allow me to toggle AirPlane mode for Windows 8 from either CMD or PowerShell.

Does anybody have a solution that expressly uses either of these options?

Danijel-James W
  • 1,356
  • 2
  • 17
  • 34
  • Here's one alternative: http://www.eightforums.com/tutorials/24541-airplane-mode-off-shortcuts-create-windows-8-a.html – paulsm4 Dec 04 '13 at 04:06
  • @paulsm4 the url http://www.eightforums.com/tutorials/24541-airplane-mode-off-shortcuts-create-windows-8-a.html I was aware of, but I wanted specifically a command that can be run from the powershell, or CMD, as it needs to be run remotely without getting up a whole desktop each time – Danijel-James W Dec 04 '13 at 04:41

2 Answers2

8

I am not aware of a way to toggle the airplane switch. But you can easily turn off all your radios using powershell in windows 8 using the Network Adapter Cmdlets

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

Get-NetAdapter 

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

Disable-NetAdapter -Name "Wi-Fi"

Or you can just disable them all like so:

Disable-NetAdapter *

And turn them back on

Enable-NetAdapter *

Note: You will need to run Powershell as admin to execute the Disable-NetAdapter and Enable-NetAdapter

malexander
  • 4,522
  • 1
  • 31
  • 37
2

A more elegant solution is:

get-netadapter wi-fi | restart-netadapter