Enterprise MSIX app attach Troubleshooting made easy

I previously built a client-based MSIX / MSIX app attach troubleshooting tool known as MSIX explorer. The tool is good, However, you have to install the app on each device and review each problematic session host individually. Therefore in an enterprise environment, this presents a challenge, especially when there may be a larger number of Session Hosts in use.

So for all those who have labs and small deployments, MSIX Log explorer is great. However, I would like to share something I have been working on in the background over the last year, amongst other things like books, speaking, and general day-to-day work.

What if I told you that you could have full visibility of any MSIX app attach error issue on all your Session Hosts within Azure Virtual Desktop? This could be 10 to 1000’s. of hosts. I have essentially built a dashboard that uses log analytics to collect Session host data, and then displays this information in the dashboard. The dashboard has been specifically designed for MSIX app attach, which shows sections for Disk issues, CimFS issues, and certificate issues.

I am pleased to announce version one (1.0.0) of the MSIXaa Troubleshooter, which has been designed for Enterprise Azure Virtual Desktop Deployments.

Please note, this is “Version one” and is not perfect by any means, however, it does help you quickly find MSIX app attach issues and I will work to improve.


The diagram below shows the high-level logical diagram that depicts the components required to collect the required information to provide visibility to the MSIX app attach potential issues and warnings.

Logical Diagram detailing the high-level component structure of MSIX Troubleshooter


The recommended way to deploy this Solution is by using the following PowerShell; remember to change the Azure region to your specific requirement:

Set-AzContext -SubscriptionId <Enter Subscription> #if using mutliple subscriptions, ensure context is set
New-AzResourceGroup -Name msixaa-logs -Location UKSouth
New-AzResourceGroupDeployment -ResourceGroupName msixaa-logs -TemplateUri https://raw.githubusercontent.com/RMITBLOG/MSIXAA-Troubleshooter/main/azuredeploy.json -location UKsouth -WorkspaceName msixaalogs

Or you can download the Azure Resource Manager template for manual deployments from my Github here: https://github.com/RMITBLOG/MSIXAA-Troubleshooter

Once you have deployed the solution, there are a few extra steps that you need to consider when using this MSIXaa troubleshooter:

  1. make sure you cap costs or monitor data ingress as costs may creep into large environments.
  2. You will need to ensure that you add all your Session hosts to the Log Analytics workspace
  3. Make sure you use the refresh Icon on the workbook to show the data

(1) Capping costs:

Make sure you look at capping your costs as shown in the two screenshots below:

Screenshot showing where you would find the daily cap setting in a Log Analytics workspace
Screenshot showing daily cap on Log ingestion costs

(2) Connecting Session Host’s to the workspace.

You can create a run book to automate this process for future deployments of session hosts or new pools. Or you can use the below script from your desktop or the Azure portal.

Before you can use the script, you will need both the WorkspaceID and WorkspaceKey, you can find these here:

Screenshot showing the Agents management blade within a Log Analytics workspace.

The following script has been designed to automate the deployment of adding the monitoring extension agent for each Session host deployed within a resource group:

# All windows VMs in the subscription (which you set via Set-AzContext)
$PublicSettings = @{ "workspaceId" = "<Enter id here>" }
$ProtectedSettings = @{ "workspaceKey" = "<Enter key here>" }
# AVD Resource Group
$AVDResgroup = "<Enter AVD Resource Group>"

# Using -Status switch to get the status too
Get-AzVM -Status | Where-Object{ $_.Powerstate -eq "VM running" -and $_.StorageProfile.OsDisk.OsType -eq "Windows" -and $_.ResourceGroupName -eq $AVDResgroup } | ForEach-Object { 
    $VMName = $_.Name
    $ResourceGroupName = $_.ResourceGroupName
    $Location = $_.Location
    Write-Host "Processing $VMName"
    Set-AzVMExtension -ExtensionName "MicrosoftMonitoringAgent" `
    -ResourceGroupName "$ResourceGroupName" `
    -VMName "$VMName" `
    -Publisher "Microsoft.EnterpriseCloud.Monitoring" `
    -ExtensionType "MicrosoftMonitoringAgent" `
    -TypeHandlerVersion 1.0 `
    -Settings $PublicSettings `
    -ProtectedSettings $ProtectedSettings `
    -Location "$Location"

3. Refresh the Dashboard – Once complete go to the dashboard and click refresh, you should then see data appearing within the MSIXaa-dash.

Important things to note:

The data is set to pull the last two hours of information from the Session hosts. This means that once you have fixed the issues, you would need to wait 2 hours for the errors to clear. The purpose of this dashboard is to help find errors and fix them, not provide a real-time health status (not yet!)

Feedback and features are welcome!

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 )

Twitter picture

You are commenting using your Twitter 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.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: