When building a new server, I'll often open up devmgmt.msc (Device Manager) to verify that there are no "unknown" devices (those with the yellow exclamation point). Is there a way to do this with PowerShell? I don't need it to do any troubleshooting (like trying to identify what those devices are), but maybe just take a count and return back "3 Unknown Devices detected".
I don't think there are any cmdlets for this, but perhaps there is a way to do it using Get-WmiObject and filter on devices with a certain attribute that indicates it's "unknown".