#PSTip Most frequently used -Verb values

In previous tip we saw how to receive all -Verb values for registered extensions. But what if we want to see all available values?
We have to modify the original command by removing the format operator. Further, we can also use Group-Object cmdlet to see count of these values (actions).

cmd /c assoc |
ForEach { $ext = ($_ -split '=')[0]; (New-Object Diagnostics.ProcessStartInfo -Argument "test$ext").Verbs } |
Group-Object |
Sort-Object Count -Desc |
Format-Table Name, Count -Auto

Name                                    Count
----                                    -----
open                                      438
shell                                     114
print                                     105
AddToPlaylistVLC                           74
PlayWithVLC                                74

 (some lines removed)

Uninstall                                   1
Author                                      1
Repair                                      1
Filed in: Columns, Tips and Tricks Tags: , , ,
© 2018 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: