Publishing RemoteApps on Microsoft Azure

20151204 - 1Recently I migrated back to Mac OS X after many years in the Microsoft wilderness. Whilst I’ve definitely not looked back, there is the (very) odd application I miss, and have not yet had time to find a replacement. Two of these are Microsoft Project and Visio, and both are integral to my day-to-day work.

To bridge the gap in the meantime, I decided to look at how I could utilize the Cloud to provide the applications I’m missing. As they are both Microsoft applications, it made sense to use the RemoteApp feature in Microsoft Azure.

As I’m not a fan of the GUI I decided to use PowerShell to create the RemoteApp collection and publish the applications.

First we need to establish the tenant ID. You can get this accessing Azure online.  Once logged in, click the Active Directory tab:
20151204 - 2Click on the default directory:
20151204 - 3The tenant ID can be found in the title bar (highlighted).

Define the following variables for your Azure connection details and tenant ID (substitute accordingly):

# Variables

$userName = "virtualhobbit.com@virtialhobbit.onmicrosoft.com"
$securePassword = ConvertTo-SecureString -String "NotMyRealPassword" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($userName, $securePassword)
$tenant = "4be75c35-7e54-4ef6-984e-9043c7a12467"

Connect to Azure using the following:

Add-AzureAccount -Credential $credential -Tenant $tenant

Define the variables for the RemoteApp collection. In the following example, I am using the trial of Microsoft Office 365 (substitute location accordingly):

$collection = "myApps"
$img = "Office 365 ProPlus (Subscription required)"
$plan = "Basic"
$location = "North Europe"
$description = "Office 365 Collection."

Create the collection:

$result = New-AzureRemoteAppCollection -CollectionName $collection -ImageName $img -Plan $plan -Location $location -Description $description

This will take a while (up to an hour). Use the following to track the progress:

Get-AzureRemoteAppOperationResult –TrackingId $result.TrackingID

In the meantime, create a CSV file with a list of users that require access to the collection. Define the variable and then grant access using:

$users = "C:\users.csv"

Import-Csv $users | ForEach {

	# Entitle the users
	Add-AzureRemoteAppUser -CollectionName $collection -Type microsoftAccount -UserUpn $_.user
	
}

Publish Visio and Project using the following:

Publish-AzureRemoteAppProgram -CollectionName $collection -FileVirtualPath "%SYSTEMDRIVE%\Program Files\Microsoft Office 15\root\office15\VISIO.EXE" -DisplayName "Visio 2013"
Publish-AzureRemoteAppProgram -CollectionName $collection -FileVirtualPath "%SYSTEMDRIVE%\Program Files\Microsoft Office 15\root\office15\WINPROJ.EXE" -DisplayName "Project 2013"

The applications will now be published.

Confirm the applications have been successfully published using:

Get-AzureRemoteAppProgram -CollectionName $collection

There are number of Azure RemoteApp clients available which can be found at https://www.remoteapp.windowsazure.com/ClientDownload/AllClients.aspx.

Mac users can download the Microsoft Remote Desktop client from https://www.remoteapp.windowsazure.com/ClientDownload/Mac.aspx.

Open the Microsoft Remote Desktop app on OS X:

20151204 - 4

Click Azure RemoteApp, followed by Get Started:20151204 - 5Enter your login details and click Sign in. Once you have signed in, select the app you require:
20151204 - 6Here you can see Visio 2013 running on my MacBook Pro:

20151204 - 7

The full PowerShell script is deployAzureRemoteApp.ps1, which you can download from my GitHub repo:

# Variables

$userName = "virtualhobbit.com@virtialhobbit.onmicrosoft.com"
$securePassword = ConvertTo-SecureString -String "NotMyRealPassword" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($userName, $securePassword)
$tenant = "4be75c35-xxxx-4ef6-984e-9043c7a12467"
$collection = "myApps"
$img = "Office 365 ProPlus (Subscription required)"
$plan = "Basic"
$location = "North Europe"
$description = "Office 365 Collection."
$users = "C:\users.csv"

# Connect to Azure
Add-AzureAccount -Credential $credential -Tenant $tenant

# Create the collection
$result = New-AzureRemoteAppCollection -Collectionname $collection -ImageName $img -Plan $plan -Location $location -Description $description

# Check the provisioning progress
$tmp = Get-AzureRemoteAppOperationResult –TrackingId $result.TrackingID
while ($tmp.Status -ne "Success"){
	Start-Sleep -seconds 5
}

# Import the list of users
Import-Csv $users | ForEach {

	# Entitle the users
	Add-AzureRemoteAppUser -CollectionName $collection -Type microsoftAccount -UserUpn $_.user
	
}

# Publish Viso and Project
Publish-AzureRemoteAppProgram -CollectionName $collection -FileVirtualPath "%SYSTEMDRIVE%\Program Files\Microsoft Office 15\root\office15\VISIO.EXE" -DisplayName "Visio 2013"
Publish-AzureRemoteAppProgram -CollectionName $collection -FileVirtualPath "%SYSTEMDRIVE%\Program Files\Microsoft Office 15\root\office15\WINPROJ.EXE" -DisplayName "Project 2013"

In the meantime, if you have any suggestions for good replacements for Visio or Project please pass them along using the comment box.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.