Q1:win11安装跳过联网
A:这时我们键盘按住shift+F10,会弹出cmd命令提示符框,然后输入:OOBE\BYPASSNRO
Q2:win11右击菜单还原旧样式
A:在windows命令行中执行以下命令后注销用户
#还原旧样式
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
#撤销旧样式
reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /va /f
Q3Win11系统游戏中弹出无法打开此 “ms-gamingoverlay” 链接
A:在windows命令行中执行以下命令
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR " /v AppCaptureEnabled /t REG_DWORD /d 0 /f
Q4:vscode 终端禁止运行脚本npm
等等
A:已管理员身份打开power shell
,然后输入:Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
再输入A
Q5:Hyper-v 新建第二代虚拟机黑屏或卡在Press any key to boot from CD or DVD,最终显示 No Operating System was Loaded…
A:在虚拟机设置安全中取消勾选启用安全启动
B:在点击启动虚拟机后疯狂按 F2,即可进入安装界面(适用windows系统镜像)
Q6:Hyper-v win11虚拟机,增强模式下画面一直停留风景页面无法登录。
A:打开设置 》账户 》登录选项,找到 windows hello 开关,关掉它。
**Q7:蓝牙设备删除失败
$Source = @"
[DllImport("BluetoothAPIs.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.U4)]
static extern UInt32 BluetoothRemoveDevice(IntPtr pAddress);
public static UInt32 Unpair(UInt64 BTAddress) {
GCHandle pinnedAddr = GCHandle.Alloc(BTAddress, GCHandleType.Pinned);
IntPtr pAddress = pinnedAddr.AddrOfPinnedObject();
UInt32 result = BluetoothRemoveDevice(pAddress);
pinnedAddr.Free();
return result;
}
"@
Function Get-BTDevice {
Get-PnpDevice -class Bluetooth |
?{$_.HardwareID -match 'DEV_'} |
select Status, Class, FriendlyName, HardwareID,
# Extract device address from HardwareID
@{N='Address';E={[uInt64]('0x{0}' -f $_.HardwareID[0].Substring(12))}}
}
################## Execution Begins Here ################
$BTR = Add-Type -MemberDefinition $Source -Name "BTRemover" -Namespace "BStuff" -PassThru
$BTDevices = @(Get-BTDevice) # Force array if null or single item
Do {
If ($BTDevices.Count) {
"`n******** Bluetooth Devices ********`n" | Write-Host
For ($i=0; $i -lt $BTDevices.Count; $i++) {
('{0,5} - {1}' -f ($i+1), $BTDevices[$i].FriendlyName) | Write-Host
}
$selected = Read-Host "`nSelect a device to remove (0 to Exit)"
If ([int]$selected -in 1..$BTDevices.Count) {
'Removing device: {0}' -f $BTDevices[$Selected-1].FriendlyName | Write-Host
$Result = $BTR::Unpair($BTDevices[$Selected-1].Address)
If (!$Result) {"Device removed successfully." | Write-Host}
Else {"Sorry, an error occured." | Write-Host}
}
}
Else {
"`n********* No devices found ********" | Write-Host
}
} While (($BTDevices = @(Get-BTDevice)) -and [int]$selected)