구성된 모든 키 조합 나열
지원되는 버전
✅ IoT Enterprise LTSC
✅ IoT Enterprise✅
Enterprise LTSC
✅ Enterprise
✅ Education
다음 샘플 Windows PowerShell 스크립트는 키보드 필터용 WMI(Windows Management Instrumentation) 공급자를 사용하여 키보드 필터에 대한 모든 키 조합 구성을 표시합니다.
List-rules.ps1
#
# Copyright (C) Microsoft. All rights reserved.
#
<#
.Synopsis
Enumerate all active keyboard filter rules on the system.
.Description
For each instance of WEKF_PredefinedKey, WEKF_CustomKey, and WEKF_Scancode,
get the Enabled property. If Enabled, then output a short description
of the rule.
.Parameter ComputerName
Optional parameter to specify the remote machine that this script should
manage. If not specified, the script will execute all WMI operations
locally.
#>
param (
[String] $ComputerName
)
$CommonParams = @{"namespace"="root\standardcimv2\embedded"}
$CommonParams += $PSBoundParameters
write-host Enabled Predefined Keys -foregroundcolor cyan
Get-WMIObject -class WEKF_PredefinedKey @CommonParams |
foreach {
if ($_.Enabled) {
write-host $_.Id
}
}
write-host Enabled Custom Keys -foregroundcolor cyan
Get-WMIObject -class WEKF_CustomKey @CommonParams |
foreach {
if ($_.Enabled) {
write-host $_.Id
}
}
write-host Enabled Scancodes -foregroundcolor cyan
Get-WMIObject -class WEKF_Scancode @CommonParams |
foreach {
if ($_.Enabled) {
"{0}+{1:X4}" -f $_.Modifiers, $_.Scancode
}
}