1.    28 Jan 2008 #1
    j0seg Guest

    Sorting output in Ascending rather than Descending


    Hi all,

    Okay I've been doing some searches online, and also reading in my powershell
    books, but I cant seem to find the command to sort in ascending, and I know I
    can sort in Descending but when I enter sort-object -ascend or -asc I get an
    error..but -desc seems to work...if I try to leave sort-object blank I also
    get an error. So I figured I'd ask for a lil help...

    Joseg

      My System SpecsSystem Spec

  2.    28 Jan 2008 #2
    Shay Levi Guest

    Re: Sorting output in Ascending rather than Descending




    There is no Ascending parameter on select-object, it's the default behavior.
    What do you get for:

    dir | sort

    Can you see that the files are sorted in Ascending order?
    Can you post your command?

    -----
    Shay Levi
    $cript Fanatic
    http://scriptolog.blogspot.com

    > Hi all,
    >
    > Okay I've been doing some searches online, and also reading in my
    > powershell books, but I cant seem to find the command to sort in
    > ascending, and I know I can sort in Descending but when I enter
    > sort-object -ascend or -asc I get an error..but -desc seems to
    > work...if I try to leave sort-object blank I also get an error. So I
    > figured I'd ask for a lil help...
    >
    > Joseg
    >

      My System SpecsSystem Spec


Similar Threads
Thread Forum
folder sorting (sub-sorting)...
this may be a tired question, (and if ever there was a previous reference to the same issue, i'm not able to find it here) but i wonder if the...
General Discussion
Files in folders appearing in descending instead of ascending order?
My image files in folders have started appearing in descening order (numerically) instead of ascending order. e.g. a folder of images will appear...
General Discussion
Re: Set Discussions by Descending Dates
A thread will be sorted by the data of the original post. To sort by the date of all posts, uncheck View, Group by conversation. Now, sort by...
Live Mail
Enexpected output when using output-csv
when I add the Output-csv my my code, I get different output than what I got on the screen. Here's my code: @( ForEach($user in Get-Content...
PowerShell
No output from write-output
I have this script, which does not run as I expected. ---------------------------------------- function foo($bar) { write-output "I got $bar" }...
PowerShell
Sorting output from foreach
Hi, I'm quite new powershell. I've written a script that will list the SamAccount and DisplayName of all members of an AD group. I want to sort...
PowerShell
sorting the help output
Hello, Does anybody know how to sort the output of the help command? Objects are sorted by categories, but inside a category, they are shuffled....
PowerShell

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 06:31.
    .