Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Sort a list but have 2 specific objects at the top

$
0
0

How can I sort a list but add a specific item to the top? For example:
apple
orange
peach
pear
grapefruit

Let’s say I want to sort the list alphabetically but I want peach up top and I only want it to appear once. I would also like Grapefruit to be 2nd. Thanks in advance!


Viewing all articles
Browse latest Browse all 13067

Trending Articles