-
-
Save minkione/e53468cad54528698c8016c1f7737d35 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
"Written by James Habben (@JamesHabben)" | |
"Last Updated: 2016-10-18" | |
"" | |
"" | |
"Start with device not inserted. Remove it now if it is in already." | |
read-host "press enter to continue" | |
$devices1 = Get-WmiObject Win32_PNPEntity | |
" Total devices before: {0}" -f $devices1.count | |
read-host "Insert device now, wait for devices to be installed, and then press enter" | |
$devices2 = Get-WmiObject Win32_PNPEntity | |
" Total devices after: {0}" -f $devices2.count | |
$diff = compare-object $devices1 $devices2 | |
"==== Diff List ====" | |
$diff | format-list | |
"==== /Diff List ====" | |
"==== Long List ====" | |
foreach ($dev in $diff) { | |
$dev.inputobject | |
"---- ---- ----" | |
} | |
"==== /Long List ====" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment