redtears

redtears

V2EX 第 30947 号会员,加入于 2012-12-20 08:13:13 +08:00
今日活跃度排名 838
根据 redtears 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
redtears 最近回复了
就一个 exe
非凡云开业大吉! https://ffy.com 开奖时间:2025/4/11 16:00
23 天前
回复了 swordspoet 创建的主题 分享发现 QQ 邮箱开通 vip 后可添加域名邮箱地址
开通一个月 VIP ,然后加上域名邮箱,过期后域名邮箱会不会失效,还是仅限制新增账户,有没有试过的
这看着怎么那么像 PairDrop 啊,除了名字以外。
45 天前
回复了 cnfczn 创建的主题 宽带症候群 联通 app 越来越下头了
去营业厅问问,把手机和宽带的费用账户绑定到一起,一起缴费,不影响各自的套餐。
65 天前
回复了 lanweizhujiao 创建的主题 游戏 有没有巨好玩的游戏推荐
超级食肉男孩
69 天前
回复了 zhangtw2024 创建的主题 Android 出 HP Elite Dragonfly Chromebook
省流:1988
https://learn.microsoft.com/en-us/answers/questions/2074409/resolved-how-to-toggle-wi-fi-in-windows-11-via-the
```shell
[CmdletBinding()] Param (
[Parameter(Mandatory=$true)][ValidateSet('Off', 'On')][string]$Status
)

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
}
[Windows.Devices.Radios.Radio,Windows.System.Devices,ContentType=WindowsRuntime] | Out-Null
[Windows.Devices.Radios.RadioAccessStatus,Windows.System.Devices,ContentType=WindowsRuntime] | Out-Null
Await ([Windows.Devices.Radios.Radio]::RequestAccessAsync()) ([Windows.Devices.Radios.RadioAccessStatus]) | Out-Null
$radios = Await ([Windows.Devices.Radios.Radio]::GetRadiosAsync()) ([System.Collections.Generic.IReadOnlyList[Windows.Devices.Radios.Radio]])
$wifiRadio = $radios | ? { $_.Kind -eq 'WiFi' }
[Windows.Devices.Radios.RadioState,Windows.System.Devices,ContentType=WindowsRuntime] | Out-Null
Await ($wifiRadio.SetStateAsync($Status)) ([Windows.Devices.Radios.RadioAccessStatus]) | Out-Null
```
以上代码保存为 ToggleWifiRadio.ps1
# Turn off
PS D:\path\to\your\folder> .\ToggleWifiRadio.ps1 -Status 'Off'

# Turn on
PS D:\path\to\your\folder> .\ToggleWifiRadio.ps1 -Status 'On'
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5195 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 06:57 · PVG 14:57 · LAX 23:57 · JFK 02:57
Developed with CodeLauncher
♥ Do have faith in what you're doing.