windows

A collection of 48 posts
windows

Powershell移除隐藏设备

#获取所有隐藏设备 $unknown_devs = Get-PnpDevice | Where-Object{$_.Status -eq 'Unknown'} #打印 $unknown_devs | Format-Table #过滤想移除的设备 $removeDeviceFriendlyName="Insert Device Name Here" $remove_devs = $unknown_devs | Where-Object{$_.FriendlyName -eq $removeDeviceFriendlyName} #打印 #$remove_devs | Format-Table #使用pnputil删除所有设备 ForEach($dev in $remove_devs){ #移除注释执行 # pnputil /remove-device $dev.
windows

Office2024 KMS激活提示非正版软件警告

在64位windows上安装32位Office的时候需要在WOW6432Node添加KeyManagementServiceName注册表项 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "" reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "" /reg:32 参考 https://massgrave.dev/office-license-is-
打印机

Windows 预安装打印机驱动

将打印机驱动复制到可以访问的共享路径 使用以下powershell脚本安装驱动 pnputil.exe /a "\\<fileshare>\koaxpj__.inf.inf" 之后确认安装后打印机驱动的路径,在C:\Windows\System32\DriverStore\FileRepository下 打开inf文件记录下实际打印机型号的名称,如 [KONICA MINOLTA.NTamd64] "KONICA MINOLTA C368SeriesPCL" "KONICA MINOLTA C3851SeriesPCL" 使用以下powershell脚本添加具体驱动 Add-PrinterDriver -Name "KONICA MINOLTA C368SeriesPCL" -InfPath "C:\Windows\System32\DriverStore\FileRepository\