Windows 11 has a fantastic built-in Mobile Hotspot feature, but it comes with an incredibly annoying limitation: it cannot be set to turn on automatically when your PC boots up. Even worse, if no devices connect to it within a few minutes, Windows aggressively shuts it down to “save power.”
If you rely on your PC to act as a permanent router for your phone, console, or smart home tech, you’ve likely found yourself digging into Windows settings every single morning to enable the Windows 11 Mobile Hotspot.
Because Microsoft removed the old command-line network tools (netsh), classic automation tricks no longer work. But don’t worry; using a refined PowerShell script and a perfectly timed Windows task, we can force the hotspot to start cleanly every single time you log in.
Here is the ultimate, foolproof guide to setting Windows 11 Mobile Hotspot up.
The Core Strategy
Because the modern Windows 11 hotspot relies on advanced APIs (WinRT), we have to use a short PowerShell script to speak its language. We then use Task Scheduler to run this script quietly in the background when you log into your desktop.
To ensure this doesn’t crash or get stuck (common bugs that plague other tutorials), our solution includes an intentional startup delay and a driver kick-start fallback mechanism.
Step 1: Prevent Windows from Shutting the Hotspot Off
Before we automate the startup, we need to tell Windows to stop killing the hotspot when it gets quiet.
- Open Windows Settings (
Win + I) and click on Network & internet on the left. - Select Mobile hotspot on the right side.
- Scroll down and locate the Power saving toggle (“When no devices are connected, automatically turn off mobile hotspot”).
- Turn this switch OFF.
Step 2: Create the Smart PowerShell Script
We will create a script that checks your internet connection, attempts to flip the hotspot on, and includes a safety timeout so it never hangs your computer.
- Open Notepad.
- Copy and paste the exact code block below:
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | Where-Object { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
# Wait up to 10 seconds for a response from Windows
if ($netTask.Wait(10000)) {
return $netTask.Result
}
return $null
}
# 1. Grab the active connection profile
$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile()
if (-not $connectionProfile) { Exit }
$tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile)
# 2. If it's off, turn it on. If it fails or times out, cycle the driver state.
if ($tetheringManager.TetheringOperationalState -eq "Off") {
$result = Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult])
# If the network driver jammed ($null) or failed, force a clear and retry
if ($null -eq $result -or $result.Status -ne "Success") {
[void](Await ($tetheringManager.StopTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult]))
Start-Sleep -Seconds 2
[void](Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult]))
}
}
- Click File > Save As…
- Change Save as type to All Files (*.*).
- Name the file
turn_on_hotspot.ps1(make sure it ends in.ps1, not.txt). - Save it to a secure folder you won’t accidentally delete later, such as
C:\Scripts\turn_on_hotspot.ps1.
Step 3: Configure the Windows Task Scheduler to start the Windows 11 Mobile Hotspot
This is where most people get stuck. If you configure this task to run “whether logged on or not,” the modern Windows network APIs will crash (Error 0xC000027B). To make it work perfectly, it must target your user session and wait just a few seconds for your Wi-Fi hardware to wake up.
- Open the Start menu, type Task Scheduler, and press Enter.
- In the right-hand Actions pane, click Create Task…
- Configure the following 4 tabs exactly as detailed:
1. General Tab
- Name:
Start WiFi Hotspot - Security options: Choose Run only when user is logged on.Why? Modern Windows 11 network features require your user profile to be fully loaded, or the task will fail immediately.
- Privileges: Check the box for Run with highest privileges.
2. Triggers Tab
- Click New… at the bottom.
- Set Begin the task to At log on.
- Under Advanced settings, check Delay task for: and change/type it to 30 seconds.
Why? If the script fires the millisecond you type your password, your network card won’t be ready yet. A 30-second breathing room ensures total stability.
- Click OK.
3. Actions Tab
This step explicitly bypasses Windows asking you “What program do you want to open this file with?” by forcing PowerShell to open it directly.
- Click New…
- Set Action to Start a program.
- In the Program/script box, type exactly:
powershell.exe
- In the Add arguments (optional) box, paste this line (including the quotes):
“`text
-ExecutionPolicy Bypass -WindowStyle Hidden -File “C:\Scripts\turn_on_hotspot.ps1”
- Click OK.
4. Settings Tab
This ensures that if anything ever goes wrong, the task clears itself out and won’t get stuck on “Currently Running.”
- Check: “Stop the task if it runs longer than:” and change it to 30 minutes.
- Bottom Dropdown: Under “If the task is already running…”, select Stop the existing instance.
- Click OK to save your task.
Setup complete! Windows 11 Mobile Hotspot is not automatic.
You’re completely set up! To test it out without restarting your PC, turn your Mobile Hotspot off in Windows settings. Then, head to Task Scheduler, right-click your new Start WiFi Hotspot task, and click Run. Within about 10 seconds, watch your Settings app flip itself right back to On.
From now on, every time you boot up and log in, Windows will quietly handle your hotspot in the background while you grab your morning coffee. Please let me know if you got any questions regarding this post.
Leave a Reply