This PowerShell script gets information on all connected USB devices on a Windows 10 system. It opens PowerShell, runs a command to get PnP devices that are currently present with an InstanceID starting with "USB", and outputs the results to a USB-Connected.txt file.
This PowerShell script gets information on all connected USB devices on a Windows 10 system. It opens PowerShell, runs a command to get PnP devices that are currently present with an InstanceID starting with "USB", and outputs the results to a USB-Connected.txt file.
This PowerShell script gets information on all connected USB devices on a Windows 10 system. It opens PowerShell, runs a command to get PnP devices that are currently present with an InstanceID starting with "USB", and outputs the results to a USB-Connected.txt file.
REM Source: https://github.com/atomiczsec/Get-Connected-USBs REM Generator: https://github.com/I-Am-Jakoby/Powershell-to-Ducky-Converter REM Target OS: Windows 10 REM Description: Payload gets all connected USB devices REM DELAY 2000 GUI r DELAY 2000 STRING powershell DELAY 250 ENTER DELAY 2000 STRING Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' } | Out-File -FilePath .\USB-Connected.txt ENTER