Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-Event - Supporting -First/-Skip/-Descending (Fixes #20444) #20445

Closed

Conversation

StartAutomating
Copy link

@StartAutomating StartAutomating commented Oct 5, 2023

PR Summary

Improving Get-Event to allow for -First/-Skip/-Descending (using the events as a stack for interactive purposes) (Fixes #20444)

PR Context

A large number of scenarios require you to pay attention to the most recent event, rather than the earliest event.

Get-Event made this more difficult than it needs to be. With a few small parameter changes, this cmdlet can be vastly more useful.

PR Checklist

@kilasuit kilasuit added WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module WG-NeedsReview Needs a review by the labeled Working Group labels Oct 9, 2023
@StevenBucher98 StevenBucher98 added the PowerShell-Docs needed The PR was reviewed and a PowerShell Docs update is needed label Oct 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Review - Needed The PR is being reviewed labels Oct 21, 2023
@SteveL-MSFT
Copy link
Member

@PowerShell/wg-powershell-cmdlets reviewed this. We don't believe a good case has been made that requires adding this feature. In addition, in general, we agreed that cmdlets should only implement this type of capability if the underlying data source supports it as an optimization to not post-process the results. We recommend using Select-Object instead which provides a consistent experience.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Review - Needed The PR is being reviewed label Nov 15, 2023
@SteveL-MSFT SteveL-MSFT added Review - Needed The PR is being reviewed WG-Reviewed A Working Group has reviewed this and made a recommendation and removed WG-NeedsReview Needs a review by the labeled Working Group labels Nov 15, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Review - Needed The PR is being reviewed label Nov 15, 2023
@SteveL-MSFT SteveL-MSFT added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 15, 2023
@StartAutomating
Copy link
Author

@SteveL-MSFT there might be a bit of "baby with the bathwater here".

While I can agree on -First and -Count, -Descending is a big improvement for events infrastructure (since one is more often interested in the most recent event than the least recent event)

@microsoft-github-policy-service microsoft-github-policy-service bot removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PowerShell-Docs needed The PR was reviewed and a PowerShell Docs update is needed WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module WG-Reviewed A Working Group has reviewed this and made a recommendation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get-Event -Descending/-First
4 participants