Listing 2: The Get-Printer Function That Produces a Sorted List of Printer Names function Get-Printer { # ******* BEGIN CALLOUT A ******* $p = @{} # ******* END CALLOUT A ******* # ******* BEGIN CALLOUT B ******* Get-WmiObject Win32_Printer | ForEach-Object {$p[$p.Count] = $_.Name} # ******* END CALLOUT B ******* # ******* BEGIN CALLOUT C ******* [System.Collections.SortedList]$p # ******* END CALLOUT C ******* }