Get the usage timestamps for previously connected external devices in PowerShell

98 views Asked by At

How can I get timestamps on previously connected External devices for a specific port? (Usage Start Time and Usage End time)

I have tried this but, i am only getting USB list, I need all the external devices are connected History on a specific port

Get-WinEvent -LogName 'Microsoft-Windows-DriverFrameworks-UserMode/Operational' |Where-Object {$_.ID -eq 2003 -or $_.ID -eq 2102} | Select-Object @{Name='TimeCreated';Expression={$_.TimeCreated.ToString('yyyy-MM-dd HH:mm:ss')}}, ID, LogName, MachineName, Message, Opcode, OpcodeDisplayName, ProviderId, ProviderName, RecordId, Task, TaskDisplayName|ConvertTo-Json
0

There are 0 answers