Long logoff times / hung sessions with EmPSHost.exe

Version 1

    Verified Product Versions

    AppSense Environment Manager 10.0AppSense Environment Manager 8.6AppSense Environment Manager 8.5AppSense Environment Manager 8.4AppSense Environment Manager 10.1

    Introduction

     

    You may notice when troubleshooting long logoff times or hung logoffs, killing the EmPShost.exe process resolves the issue.

     

    Detail

    This process is installed by the Environment Manager Agent installer and is a required process for PowerShell actions and conditions in your configuration.

     

    Once the custom script is executed the Environment Manager Agent will wait for the script to complete. If for a reason the script does not complete, this can hang logoff as the agent is still waiting for the response and to then close EmPShost.exe.

     

    This can be seen for example with a script at logon that is executed but never closes therefore at logoff the Agent is still waiting for this action to complete.

     

    To protect against this issue we recommend to add a maximum run time for the script.

     

     

    By default this is set to 0 which will let the script run until completed. Changing this setting to 30 seconds for example to allow the script to only run for 30 seconds before the action is completed. In turn this will prevent any issues at logoff with a long logoff / hung session if this is caused by EmPShost.exe still running.

    When adding a run time, its recommenced to test the vales to ensure you are allowing enough time for the script to run, as once the time has elapsed the Agent will stop processing the action regardless if the script is complete or not.

    Further information on the EmPShost.exe process can be found in the following document.

    The EmPsHost.exe Process