Added name sorting

This commit is contained in:
Markus Fleschutz 2024-05-31 11:41:29 +02:00
parent 0259513e6c
commit 7eb91355eb
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@
#>
try {
Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"} | Format-Table -property FriendlyName,Status,InstanceId
Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -17,7 +17,7 @@
#>
try {
Get-PnpDevice | Where-Object {$_.Class -like "SCSI*"} | Format-Table -property FriendlyName,Status,InstanceId
Get-PnpDevice | Where-Object {$_.Class -like "SCSI*"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -17,7 +17,7 @@
#>
try {
Get-PnpDevice | Where-Object {$_.Class -eq "USB"} | Format-Table -property FriendlyName,Status,InstanceId
Get-PnpDevice | Where-Object {$_.Class -eq "USB"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"