Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Request: Improve user experience of Get-WinEvent -FilterHashtable #9239

Copy link
Copy link
@HumanEquivalentUnit

Description

@HumanEquivalentUnit
Issue body actions

Get-WinEvent uses -FilterHashtable @{..} as one way to describe which events to retrieve, and the hashtable takes keys like ID, StartTime. But there's no way to find out which keys are valid without reading the help.

This feels like a PS-style design would have exposed those keys as parameters, they would show up for tab completion and introspection, and then splatting would be available for the hashtable use case.

My experience would be better if there was a quick way to see the valid keys without having to refer to the help, so:

  1. Would it be possible for tab-completion to suggest valid hashtable keys, if the hashtable was being written in this context, e.g. get-winevent -filterhashtable @{ <tab> ?
  2. Would it be possible to make Ctrl-Space suggestions, which currently lists all parameters in a nice view, also support showing some text which isn't parameters - hashtable keys specifically in this case, or in a more general case cmdlets could optionally show a cheatsheet section with some free-form text.
  3. What about exposing the keys as parameters, making them usable by splatting, and deprecating -FilterHashTable?

(FilterXPath and FilterXml parameters also exist, I have no comment on them, they can stay how they are from my point of view).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.