Skip to content

PSRP: handle USER_EVENT #49

Description

Gap

USER_EVENT (a server→client runspace-pool event, e.g. from Register-EngineEvent / New-Event forwarding) is not handled — message-type ID only. Both pypsrp/psrpcore and native C# consume it.

Current state

  • Enum ID only in crates/ironposh-psrp/src/cores.rs; no message struct, not dispatched in the runspace-pool incoming handler.

Required

  • Parse the USER_EVENT PSRP message (PSEventArgs: event identifier, source id, source args, message data, time, computer, runspace id).
  • Surface it as a client-core UserEvent-style output so consumers can observe forwarded events.

Acceptance

  • Test: a script that fires a forwarded engine event produces a parsed user-event on the client stream.

References

  • psrpcore src/psrpcore/_psrp.py (USER_EVENT, send_event), pypsrp powershell.py _process_user_event.
  • Native C# EncodeAndDecode.cs (PSEventArgs, 0x00021008).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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