Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Sort Objects Based on a Particular Property

$
0
0

Summary: Learn how to use the Sort-Object Windows PowerShell cmdlet to sort on a specific property.

Hey, Scripting Guy! Question How can I sort a collection of Windows PowerShell objects without using the default property?

Hey, Scripting Guy! Answer Use the –Property parameter and specify the name of the property to sort on:

get-childitem | sort-object -property length 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>