Share via

How to enable and connect to LTE/Cellular network via powershell or cmd

Anonymous
2023-02-03T16:59:49+00:00

Question in the title.

Google has been utterly useless at answering this simple question: on LTE capable computers, in windows 10 and 11 Wifi, bluetooth, etc. can be turned off and on by just clicking/tapping on the big icon in the notification area. If the button is blue, it means its turned on. If its grey, it means its turned off.

I need to find a way to turn on CELLULAR data connection - not just enable the adapter, but turn it on, make that big button blue and connect to an LTE network as configured in the APN.

Powershell "Enable-NetAdapter -Name "<cellular adapter name>" -Confirm:$false" doesn't work. It may very well enable the DEVICE if its disabled, but it does not turn the Cellular blue and does not connect to anything.

CMD "netsh mbn connect interface="<adapter name>" connmode=name name="{....}" does not work - and is extremely painful to automate into a .bat file (which is the end goal here) - results in "Connect Failure: error 0x139f." and no, it is not because of roaming, I've run "netsh mbn set dataroamcontrol interface=Cellular profileset=all state=all" and it still results in the same error.

There are some other things I've tried, but none worked. It's a very simple thing I'm trying to achieve here, so it's baffling that it is so difficult to figure out and more so that Google has been so useless in helping.

If someone could provide just 1 command that will achieve what I'm after here, I would be extremely grateful. I don't mind whether its a powershell command or cmd, as long as it works, and it works on windows 10 and 11 both, I'd be happy.

Thank you!

Windows for home | Windows 10 | Internet and connectivity

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-02-04T04:14:52+00:00

    From what I can tell, only netsh will do it. Since you said it "does not work", I believe you did it wrong.

    netsh for instance also has "dataenablement" which is "Turns the Mobile Broadband data on or off for the given profile set and interface." And you did not list that as a thing you've tried.

    I believe all you need to do is to get that right. You might instead of a .bat maybe can put it into a .ps1 powershell file or something else. But, either way, I think you need to figure out netsh and get it working. I don't have or use mobile with Windows to be able to do that for you.

    https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-mbn

    1 person found this answer helpful.
    0 comments No comments