Skip to content

Instantly share code, notes, and snippets.

@sicet7
Created January 28, 2022 15:34
Show Gist options
  • Save sicet7/8cde3bade5d3641e653d9259d21bdcd8 to your computer and use it in GitHub Desktop.
Save sicet7/8cde3bade5d3641e653d9259d21bdcd8 to your computer and use it in GitHub Desktop.
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