PeetersOnline.nl
“It’s the time for lists”, I read somewhere today. Sure, that is true. But blogging little lists isn’t much fun.
So, I will let you generate your very own TOP 10 list. Use the following Powershell Oneliner to get a TOP 10 list of your most frequently used cmdlets in your scripts. (Remember to modify the path to your script storage location.)
Happy Holidays!
Get-ChildItem D:Scripts -Filter *.ps1 -Recurse |
Select-String (Get-Command|%{$_.Name}) |
Group Pattern |
Sort Count -Descending |
Select -First 10 |
Format-Table Name, Count -AutoSize
No related posts.
One Response to TOP 10 Commandlets in a Oneliner
Tags
Active Directory API bind order cleanup cluster CPU Custom Fields datastores description device management directory tree errors Event Log file name filter Fun function HA IT known issues License Server LUN multipath NIC objects Oneliner portgroups PowerCLI PowerShell profile recursive Registry Scripts security session share snapshots SQL Stat VI Toolkit VMware vSphere WMI WSUS ZenArchives
- July 2012
- July 2011
- February 2011
- January 2011
- December 2010
- May 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008





Very fun! And interesting! I don’t have many scripts, so my numbers are low, but… My results:
Name Count
—- —–
Write-Host 762
New-Object 362
Add-Member 59
Get-Date 57
Start-Sleep 38
Read-Host 31
ForEach-Object 28
Remove-Variable 26
Test-Path 25
Get-WmiObject 20