Sorting Using For Loop In Powershell Foreach