Get-PnpDevice : liste de tous les périphériques PnP connectés ou non.
Get-PnpDevice -PresentOnly : liste des périphériques connectés au PC.
1 - Dans la zone de recherche Windows, saisissez "powershell".
2 - Cliquez sur Windows PowerShell puis faites un clic droit sur Windows PowerShell.
3 - Cliquez sur Exécuter en tant qu'administrateur.
4 - Saisissez la commande suivante et validez par Entrée.
La liste des périphériques PnP connectés à votre ordinateur s'affiche aussitôt à l'écran.Get-PnpDevice -PresentOnly
Vous pouvez spécifier une autre option de sortie, par exemple un fichier texte, choix retenu pour ce tutoriel.
La commande devient alors :
Get-PnpDevice -PresentOnly | Out-File C:\devices.txt
La commande Get-PnpDevice peut être précisée par différents paramètres.
Source : https://technet.microsoft.com/fr-fr/lib ... 30248.aspxSyntaxe de la commande Get-PnpDevice
Parameter Set: ByClass
Get-PnpDevice [-CimSession <CimSession[]> ] [-Class <String[]> ] [-InformationAction <System.Management.Automation.ActionPreference]> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String]> ] [-PresentOnly] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]
Parameter Set: ByFriendlyName
Get-PnpDevice [-CimSession <CimSession[]> ] [-Class <String[]> ] [-FriendlyName <String[]> ] [-InformationAction <System.Management.Automation.ActionPreference]> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String]> ] [-PresentOnly] [-Status {OK | ERROR | DEGRADED | UNKNOWN}[] ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]
Parameter Set: ByInstanceId
Get-PnpDevice [[-InstanceId] <String[]> ] [-CimSession <CimSession[]> ] [-Class <String[]> ] [-InformationAction <System.Management.Automation.ActionPreference]> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String]> ] [-PresentOnly] [-Status {OK | ERROR | DEGRADED | UNKNOWN}[] ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]
Parameter Set: ByPresence
Get-PnpDevice [-CimSession <CimSession[]> ] [-Class <String[]> ] [-InformationAction <System.Management.Automation.ActionPreference]> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String]> ] [-PresentOnly] [-Status {OK | ERROR | DEGRADED | UNKNOWN}[] ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]
Parameter Set: ByStatus
Get-PnpDevice [-CimSession <CimSession[]> ] [-InformationAction <System.Management.Automation.ActionPreference]> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String]> ] [-Status {OK | ERROR | DEGRADED | UNKNOWN}[] ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]