Sorting data in PowerShell is something that is done very frequently, and is one of PowerShell's strengths. As with many cmdlets, sorting objects can start very simple but will get increasingly difficult.
In this recipe, you will sort input for other cmdlets and observe the difficulties that you will inevitably face when sorting output. There are often times where sorting data is important, for example, to identify the five most memory-consuming processes in case of an issue. Other than that, sorting is often only done for display purposes.