mkellerman / Invoke-CommandAs

Invoke Command As System/Interactive/GMSA/User on Local/Remote machine & returns PSObjects.

Home Page:https://www.powershellgallery.com/packages/Invoke-CommandAs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing entries from the Task Scheduler log

dfranciscus opened this issue · comments

I use the -AsSystem often and I see that creates a new task each time so on my clients the Task Scheduler log is filling up with old entries. For now I will think of a way to clear these out myself but maybe there is something that can be done to remove these automatically? Just spit balling here.

Cleanup should be happening. You should not be seeing a task lingering there once it ran.

See:

Write-Verbose "$(Get-Date): ScheduledTask: Unregister"

What OS/PSVersion are you running this from and to? What version of the module are you using?

Ah maybe its the module version. I was using 2.2 could that be it? I had some issues with newer ones a while back and didnt have time to figure out what the issue was. I can try again.

Yeah, it should be all fixed now!
Please report back if the problem persists or if there is any new issues with your use case.