Created
January 28, 2022 15:34
-
-
Save sicet7/8cde3bade5d3641e653d9259d21bdcd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Decode { | |
If ($args[0] -is [System.Array]) { | |
[System.Text.Encoding]::ASCII.GetString($args[0]) | |
} | |
Else { | |
"Not Found" | |
} | |
} | |
#$test = Get-WmiObject WmiMonitorID -Namespace root\wmi | |
#$test | |
$test = gwmi Win32_USBControllerDevice -Namespace root\cimv2 | %{[wmi]($_.Dependent)} | Sort Description,DeviceID | ft Description,DeviceID –auto | |
$test | |
#Decode ($test.SerialNumberID -notmatch 0) | |
#Decode ($test.ManufacturerName -notmatch 0) | |
#Decode ($test.UserFriendlyName -notmatch 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment