During the last couple of projects I did I noticed that Microsoft Lync would prevent my session to log off normally, either on a Citrix XenApp/XenDestop or normal fat client deployment. Somehow running Lync stopped the logoff process and I would the error “This program is preventing Windows from logging off”: