win11怎么连接手机热点(Win11电脑连接热点无法上网) |
您所在的位置:网站首页 › win10不能打开无线网 › win11怎么连接手机热点(Win11电脑连接热点无法上网) |
Win10系统自带了移动热点功能,配备无线网卡的电脑,直接点击移动热点就可以使用手机等设备共享本地网络连接wifi上网了。但是移动热点每次开机都需要再次点击才能打开热点,下面就是如何配置开机自动启动移动热点的方法。 1、鼠标右击Win10屏幕左下角的开始菜单,或者按Win X弹出隐藏菜单,打开Windows PowerShell(管理员)(A),在Windows11中可以打开 Windows终端(管理员) 2、在打开的Windows PowerShell窗口中输入:set-executionpolicy remotesigned 然后按下回车键确定 3、确定后将出现如下的提示。输入‘a’然后按下回车键。关闭Windows PowerShell窗口。 4、在资源管理器地址栏输入:%appdata%MicrosoftWindowsStart MenuProgramsStartup 然后按下回车键进入“启动”文件夹,空白处新建一个文本文档,在文本中输入以下内容: powershell -executionpolicy remotesigned -file "%appdata%MicrosoftWindowsStart MenuPrograms开启热点.ps1" exit 5、关闭并保存文本文档,把文档名称改为“开机启动热点”,后缀名.txt改为.bat。 6、在资源管理器的地址栏输入:%appdata%MicrosoftWindowsStart MenuPrograms 然后按下回车键进入“程序”文件夹,在空白处新建一个文本文档,在文档中输入以下内容: Add-Type -AssemblyName System.Runtime.WindowsRuntime $asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.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)) $netTask.Wait(-1) | Out-Null $netTask.Result } Function AwaitAction($WinRtAction) { $asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and !$_.IsGenericMethod })[0] $netTask = $asTask.Invoke($null, @($WinRtAction)) $netTask.Wait(-1) | Out-Null } $connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile() $tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile) if ($tetheringManager.TetheringOperationalState -eq 1) { "Hotspot is already On!" } else{ "Hotspot is off! Turning it on" Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult]) } 7、关闭并保存文本文档,修改文档名称为“开启热点”,后缀名.txt改为.ps1 8、重启电脑就能开机自动启动移动热点了,如果安装了杀毒软件,记得把“开机启动热点.bat”添加为信任项即可。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |