Hello @shingy,
Paul - thanks for the Powershell Script.
Although it uses PowerShell
commands, you run it in a CMD Prompt.
I haven't run that yet, but was curious what the output will be and how I will be able to utilize it.
The output from the above Script gives you general information about the Laptop Keyboard. This is what my Laptop Keyboard output is . . .
Code:
Description : Standard PS/2 Keyboard
Device ID : ACPI\PNP0303\4&11509FD2&0
Install Date : --> [NO Date Present]
Name : Enhanced (101- or 102-key)
Password : N/A
IsLocked : N/A
Layout : 00000809
Creation Class Name : Win32_Keyboard
System Creation Class Name : Win32_ComputerSystem
Config Manager User Config : False
Config Manager Error Code : 0
Number Of Function Keys : 12
Power Management Supported : False
Power Management Capabilities : N/A
Last Error Code : N/A
Error Description : N/A
Error Cleared : N/A
Availability : N/A
Cim Class : root/cimv2:Win32_Keyboard
Cim Instance Properties : {Caption, Description, InstallDate, Name...}
Cim System Properties : Microsoft.Management.Infrastructure.CimSystemProperties
Status : OK
Status Info : N/A
I also have a wired Keyboard plugged into my Laptop. In that case, you can run this Script to get exactly the same information as above, but for the USB Keyboard attached. Copy & Paste
the following into a CMD Prompt and press Enter
. . .
Code:
PowerShell Get-CimInstance -ClassName Win32_Keyboard ^| Sort-Object -Property Description ^| Select-Object -Skip 1 ^
@{L=' Description' ;E={;if([string]::IsNullOrWhiteSpace($_.Description)) {'N/A'} else {$_.Description}}}, ^
@{L=' Device ID' ;E={;if([string]::IsNullOrWhiteSpace($_.DeviceID)) {'N/A'} else {$_.DeviceID}}}, ^
@{L=' Install Date' ;E={;if([string]::IsNullOrWhiteSpace($_.InstallDate)) {'--^> [NO Date Present]'} else {$_.InstallDate}}}, ^
@{L=' Name' ;E={;if([string]::IsNullOrWhiteSpace($_.Name)) {'N/A'} else {$_.Name}}}, ^
@{L=' Password' ;E={;if([string]::IsNullOrWhiteSpace($_.Password)) {'N/A'} else {$_.Password}}}, ^
@{L=' IsLocked' ;E={;if([string]::IsNullOrWhiteSpace($_.IsLocked)) {'N/A'} else {$_.IsLocked}}}, ^
@{L=' Layout' ;E={;if([string]::IsNullOrWhiteSpace($_.Layout)) {'N/A'} else {$_.Layout}}}, ^
@{L=' Creation Class Name' ;E={;if([string]::IsNullOrWhiteSpace($_.CreationClassName)) {'--^> [NO data available]'} else {$_.CreationClassName}}}, ^
@{L=' System Creation Class Name' ;E={;if([string]::IsNullOrWhiteSpace($_.SystemCreationClassName)) {'--^> [NO data available]'} else {$_.SystemCreationClassName}}}, ^
@{L=' Config Manager User Config' ;E={;if([string]::IsNullOrWhiteSpace($_.ConfigManagerUserConfig)) {'N/A'} else {$_.ConfigManagerUserConfig}}}, ^
@{L=' Config Manager Error Code' ;E={;if([string]::IsNullOrWhiteSpace($_.ConfigManagerErrorCode)) {'N/A'} else {$_.ConfigManagerErrorCode}}}, ^
@{L=' Number Of Function Keys' ;E={;if([string]::IsNullOrWhiteSpace($_.NumberOfFunctionKeys)) {'N/A'} else {$_.NumberOfFunctionKeys}}}, ^
@{L=' Power Management Supported' ;E={;if([string]::IsNullOrWhiteSpace($_.PowerManagementSupported)) {'N/A'} else {$_.PowerManagementSupported}}}, ^
@{L=' Power Management Capabilities';E={;if([string]::IsNullOrWhiteSpace($_.PowerManagementCapabilities)) {'N/A'} else {$_.PowerManagementCapabilities}}}, ^
@{L=' Last Error Code' ;E={;if([string]::IsNullOrWhiteSpace($_.LastErrorCode)) {'N/A'} else {$_.LastErrorCode}}}, ^
@{L=' Error Description' ;E={;if([string]::IsNullOrWhiteSpace($_.ErrorDescription)) {'N/A'} else {$_.ErrorDescription}}}, ^
@{L=' Error Cleared' ;E={;if([string]::IsNullOrWhiteSpace($_.ErrorCleared)) {'N/A'} else {$_.ErrorCleared}}}, ^
@{L=' Availability' ;E={;if([string]::IsNullOrWhiteSpace($_.Availability)) {'N/A'} else {$_.Availability}}}, ^
@{L=' Cim Class' ;E={;if([string]::IsNullOrWhiteSpace($_.CimClass)) {'N/A'} else {$_.CimClass}}}, ^
@{L=' Cim Instance Properties' ;E={;if([string]::IsNullOrWhiteSpace($_.CimInstanceProperties)) {'N/A'} else {$_.CimInstanceProperties}}}, ^
@{L=' Cim System Properties' ;E={;if([string]::IsNullOrWhiteSpace($_.CimSystemProperties)) {'N/A'} else {$_.CimSystemProperties}}}, ^
@{L=' Status' ;E={;if([string]::IsNullOrWhiteSpace($_.Status)) {'N/A'} else {$_.Status}}}, ^
@{L=' Status Info' ;E={;if([string]::IsNullOrWhiteSpace($_.StatusInfo)) {'N/A'} else {$_.StatusInfo}}} ^| ^
Out-String -Width 1000 -Stream ^| Where {$_.Trim().Length -gt 0}
This is what my USB Keyboard output is . . .
Code:
Description : USB Input Device
Device ID : USB\VID_1A2C&PID_2124&MI_00\7&22FA3C1C&0&0000
Install Date : --> [NO Date Present]
Name : Enhanced (101- or 102-key)
Password : N/A
IsLocked : N/A
Layout : 00000809
Creation Class Name : Win32_Keyboard
System Creation Class Name : Win32_ComputerSystem
Config Manager User Config : False
Config Manager Error Code : 0
Number Of Function Keys : 12
Power Management Supported : False
Power Management Capabilities : N/A
Last Error Code : N/A
Error Description : N/A
Error Cleared : N/A
Availability : N/A
Cim Class : root/cimv2:Win32_Keyboard
Cim Instance Properties : {Caption, Description, InstallDate, Name...}
Cim System Properties : Microsoft.Management.Infrastructure.CimSystemProperties
Status : OK
Status Info : N/A
Is it meant for my own use.
Anyone can use the Scripts above to find information about their Laptop Keyboard or attached USB Keyboard.
I just put this together for you because I thought that yoiu might find it useful and interesting.