Powershell profile "on exit" event?
        Posted  
        
            by poke
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by poke
        
        
        
        Published on 2010-03-12T23:19:17Z
        Indexed on 
            2010/03/12
            23:47 UTC
        
        
        Read the original article
        Hit count: 343
        
powershell
I'm looking for a way to automatically do some clean up tasks when the PowerShell session quits. So for example in my profile file I start a process which needs to run in the background for quite a lot of tasks and I would like to automatically close that process when I close the console.
Is there some function the PowerShell automatically calls when closing the session as it does with prompt when displaying the prompt?
© Stack Overflow or respective owner