Skip to content

Instantly share code, notes, and snippets.

@eric100lin
Last active December 12, 2019 04:20
Show Gist options
  • Save eric100lin/9b2cbbcf3c7e556fe69a758beed522d9 to your computer and use it in GitHub Desktop.
Save eric100lin/9b2cbbcf3c7e556fe69a758beed522d9 to your computer and use it in GitHub Desktop.
Put these files in C:\Users\YOUR_USER_NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
#https://superuser.com/questions/1174124/turn-on-mobile-hotspot-on-startup-windows-10
$a = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager, Windows.Networking.NetworkOperators, ContentType=WindowsRuntime]::CreateFromConnectionProfile(
[Windows.Networking.Connectivity.NetworkInformation, Windows.Networking.Connectivity, ContentType=WindowsRuntime]::GetInternetConnectionProfile()
)
$a.StartTetheringAsync() # to start the Mobile hotspot
#$a.StopTetheringAsync() # to stop the Mobile hotspot
start ms-settings:network-mobilehotspot
start taskmgr.exe
start powershell -File "C:\Users\mtk13471\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\WifiSpotStartup.ps1"
taskkill /IM notepad.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment