Log Off an Azure Remote App User via PowerShell

I wrote this script because Azure Remote App is shit and always causes problems for users. One of the bigger problems is when a user’s application within Azure Remote App freezes, the user can’t simple restart the remote app as the server keeps the session and frozen/crashed application alive.

The solution to this is to log the user off the server. This module is designed to be a super simple way to log off a user just by using their email address that is associated with the Azure Remote App account.

Example 1: this will prompt you for credentials then end the users session

end-azureSession

Example 2: You can save and pass credentials to the module

$cred = get-credential
end-azureSession $cred

You can find the module on my GitHub: end-azureSession.psm1