squaredup / Community.DataOnDemand.MP

The Data on Demand Management Pack contains a number of useful System Center Operations Manager (SCOM) agent tasks, including the Netstat task required by Squared Up Visual Application Discovery & Analytics.
GNU General Public License v3.0
4 stars 2 forks source link

[Suggestion] PS scripts: Put the sorted property first #25

Closed mortenlerudjordet closed 7 years ago

mortenlerudjordet commented 7 years ago

This might just be a personal preference, though I will leave this up to others.

For the PS scripts put the property being sorted at the front.

Current: | Sort-Object -Property Name ` | Select-Object DisplayName, Status, Name

Proposed: | Sort-Object -Property Name ` | Select-Object Name, Status, DisplayName

In my opinion this looks better when running an on demand task. But I will let others decide.

shadeon commented 7 years ago

Hi Morten,

Good idea, I'd agree it makes for more natural reading (especially in the case of sorting on datetime).

We happily accept pull requests on this repo (targeting the develop branch), so if you have the time feel free to make the changes you outlined above and submit them. Do watch out for the tasks that allow the caller to specify the ordering property - you'll want to make sure you account for this in the Select-Object.

mortenlerudjordet commented 7 years ago

I'll give it a whack when I have some spare time.

mortenlerudjordet commented 7 years ago

I have created a pull request for the suggested changes here: https://github.com/squaredup/Community.DataOnDemand.MP/pull/27

mortenlerudjordet commented 7 years ago

Closing this as my code suggestion is merged in