Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Polaris leaves behind a couple of event subscribers #215

@pcgeek86

Description

@pcgeek86

Polaris Bug Report

Description of the bug


After running Stop-Polaris and Clear-Polaris, the Polaris module leaves behind a couple of event subscriptions. These should be cleaned up during Clear-Polaris, I believe.

Steps to reproduce

Steps to reproduce the behavior:

New-PolarisGetRoute -Path / -ScriptBlock { }
Start-Polaris
Stop-Polaris
Clear-Polaris

Now run Get-EventSubscriber, and there are a couple of registrations active.

SubscriptionId   : 2
SourceObject     : System.Management.Automation.PowerShell
EventName        : InvocationStateChanged
SourceIdentifier : fee5b04f-61a9-4ab3-a68a-1ee1bc9f3508
Action           : System.Management.Automation.PSEventJob
HandlerDelegate  :
SupportEvent     : False
ForwardEvent     : False

SubscriptionId   : 3
SourceObject     : CallbackEventBridge
EventName        : callbackcomplete
SourceIdentifier : cc883506-5c5e-48a0-b471-930beca121e1
Action           : System.Management.Automation.PSEventJob
HandlerDelegate  :
SupportEvent     : False
ForwardEvent     : False

Expected behavior

No leftover event subscribers are registered in PowerShell.

Version Information


Run the following script and copy and paste the results here:

PSCompatibleVersionsPlatformPSRemotingProtocolVersionSerializationVersionWSManStackVersionPSEditionPSVersionOSGitCommitId
1.0.-1.-1, 2.0.-1.-1, 3.0.-1.-1, 4.0.-1.-1, 5.0.-1.-1, 5.1.10032.0, 6.0.0.-1, 6.1.0.-1, 6.2.0.-1, 7.0.0.-1, 7.1.0.-1Win32NT2.31.1.0.13.0Core7.1.0Microsoft Windows 10.0.190417.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions