• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Archives
  • Findings
  • Meetups
  • Videos
  • Events
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp Dashboards
    • ControlUp for Desktops
    • ControlUp for VDI
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp Workflows
  • Topics
    • Logos & Wallpaper
    • ControlUp.com
  • Join

How to Diagnose Microsoft Teams SlimCore Optimization in Citrix and Other VDI Environments Using PowerShell Scripts

Posted on July 1, 2026

This discussion highlights two PowerShell scripts developed to aid tracking and diagnosing Microsoft Teams SlimCore Optimization specifically within Citrix environments, with potential applicability to Azure Virtual Desktop (AVD), Windows 365 (W365), and VMware Horizon sessions. SlimCore is an optimized media stack used in virtual desktop infrastructure (VDI) scenarios to enhance Teams call performance by offloading audio and video processing to the client side.

The first script provides a simple check to determine if SlimCore Optimization is active by reading a JSON status file stored at a defined path inside the user’s local app data directory for Teams. It extracts the current session ID, user name, and evaluates whether the connected stack is set to “remote,” indicating that SlimCore (VDI 2.0) mode is active. The script outputs this basic status to the console for quick verification.

The second, more detailed script parses the same JSON file but dives deeper into the telemetry data recorded for Teams VDI sessions. It enumerates all entries in the VdiConnectionInfo array and reports key diagnostic details per entry, including timestamp, Teams version, Citrix Workspace App (CWA) client and plugin versions, client OS version, and various other related software components like bridge version, web client version, VM version, and remote SlimCore version. Additionally, it identifies selected audio and video peripherals, listing the connected microphone, speaker, and camera labels, and summarizes call metadata if present (call ID, direction, type, and duration). These diagnostic outputs provide a comprehensive snapshot of the Teams SlimCore environment and peripheral usage inside the virtual session.

Both scripts rely on the presence of the MSTeams VDI connection info JSON file at a fixed location under the local app data path for the Microsoft Teams UWP package (MSTeams_8wekyb3d8bbwe). The detailed script also includes error handling for missing files or absent relevant entries. These scripts were shared as useful utilities for administrators and support teams troubleshooting Teams media optimization issues in Citrix-hosted or other VDI environments.

The community acknowledged the value of these diagnostics and suggested that monitoring these metrics natively within Citrix or other VDI management tools would be beneficial, especially since SlimCore optimization is relevant across multiple virtualization platforms like AVD and Horizon. The detailed insights provided by the second script can significantly assist in understanding which Teams clients, plugin versions, and peripheral configurations are in use across sessions, aiding in performance tuning and issue resolution.

For administrators intending to leverage these scripts, it is important to note the dependency on the Teams JSON telemetry path, which may vary by Teams version or packaging method. Integration or automation into monitoring frameworks would require scheduled execution with appropriate permissions and potentially parsing or exporting this detailed output for alerting or trend analysis.

More information about Microsoft Teams SlimCore Optimization in VDI environments can be found in Microsoft documentation, as well as best practice guidance in environment-specific knowledge bases such as the Citrix Workspace App docs. ControlUp’s own monitoring platform also offers insights into Teams and Citrix session health, which could be augmented with these scripts for deeper media stack diagnostics.

Read the entire ‘How to Diagnose Microsoft Teams SlimCore Optimization in Citrix and Other VDI Environments Using PowerShell Scripts’ thread below:

Hey,

I would like to share two small scripts to help track Citrix Microsoft Teams SlimCore Optimization.
The second script provides more detailed insights, such as connected cameras, plugin version, and more.

First script:

“`
$teamsCachePath = Join-Path $env:LOCALAPPDATA ‘Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\tfw\vdi_connection_info.json’

$isSlimCoreActive = 0

if (Test-Path $teamsCachePath) {
$json = Get-Content $teamsCachePath -Raw | ConvertFrom-Json
$stack = $json.VdiConnectionInfo[0].vdiConnectedState.connectedStack

if ($stack -eq ‘remote’) {
$isSlimCoreActive = “true”
}
}
$CurrentSessionID = [System.Diagnostics.Process]::GetCurrentProcess().SessionId
$SessionUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name

Write-Host “Current Session ID: ” $CurrentSessionID -ForegroundColor Green
Write-Host “Session Name: ” $SessionUser -ForegroundColor Green
Write-Host “isSlimCoreActive: ” $isSlimCoreActive -ForegroundColor Green“`
Second script

“`$JsonPath = Join-Path $env:LOCALAPPDATA ‘Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\tfw\vdi_connection_info.json’

if (-not (Test-Path $JsonPath)) {
Write-Host “Error: No Teams VDI data found at $JsonPath.” -ForegroundColor Red
return
}

$RawJson = Get-Content -Raw -Encoding UTF8 -Path $JsonPath
$JsonObject = $RawJson | ConvertFrom-Json
$Entries = $JsonObject.VdiConnectionInfo

if (-not $Entries) {
Write-Host “Error: No VdiConnectionInfo entries found inside the JSON file.” -ForegroundColor Red
return
}

Clear-Host
Write-Host “=========================================================”
Write-Host ” CITRIX / TEAMS SLIMCORE DIAGNOSTICS “
Write-Host “=========================================================”
Write-Host “Total log entries found: $($Entries.Count)”
Write-Host “”

$Index = 1
foreach ($Entry in $Entries) {
$Status = $Entry.vdiConnectedState.connectedStack
$Timestamp = $Entry.vdiConnectedState.isoTimestamp
$TeamsVersion = $Entry.vdiVersionInfo.teamsVersion
$CWAClient = $Entry.vdiVersionInfo.rdClientProductName
$CWAVersion = $Entry.vdiVersionInfo.rdClientVersion
$PluginVersion = $Entry.vdiVersionInfo.pluginVersion
$OSVersion = $Entry.vdiVersionInfo.clientOsVersion
$bridgeVersion = $Entry.vdiVersionInfo.bridgeVersion
$clientPlatform = $Entry.vdiVersionInfo.clientPlatform
$webClientVersion = $Entry.vdiVersionInfo.webClientVersion
$vmVersion = $Entry.vdiVersionInfo.vmVersion
$remoteSlimcoreVersion = $Entry.vdiVersionInfo.remoteSlimcoreVersion

$SelectedMic = $Entry.devices.microphone.selected
$SelectedSpk = $Entry.devices.speaker.selected
$SelectedCam = $Entry.devices.camera.selected

$MicLabel = ($Entry.devices.microphone.available | Where-Object { $_.id -eq $SelectedMic }).label
$SpkLabel = ($Entry.devices.speaker.available | Where-Object { $_.id -eq $SelectedSpk }).label
$CamLabel = ($Entry.devices.camera.available | Where-Object { $_.id -eq $SelectedCam }).label

if (-not $MicLabel) { $MicLabel = “None selected / Not found” }
if (-not $SpkLabel) { $SpkLabel = “None selected / Not found” }
if (-not $CamLabel) { $CamLabel = “No camera selected / Not found” }

$CallInfo = “No active call recorded in this interval”
if ($Entry.calls) {
$Call = $Entry.calls | Select-Object -First 1
$StartTime = [DateTime]$Call.startTime
$EndTime = [DateTime]$Call.endTime
$Duration = New-TimeSpan -Start $StartTime -End $EndTime
$CallInfo = “ID: $($Call.callId) | Direction: $($Call.direction) | Type: $($Call.callType) | Duration: $($Duration.Seconds) sec”
}

Write-Host “———————————————————” -ForegroundColor Cyan
Write-Host ” ENTRY $Index of $($Entries.Count)” -ForegroundColor Cyan
Write-Host “———————————————————” -ForegroundColor Cyan
Write-Host “Timestamp (UTC): $Timestamp”

Write-Host “VDI Status: ” -NoNewline
if ($Status -eq “remote”) {
Write-Host “OK – SlimCore (VDI 2.0) is ACTIVE” -ForegroundColor Green
} else {
Write-Host “WARNING – Fallback / Unoptimized Mode” -ForegroundColor Red
}

Write-Host “Client OS: $OSVersion”
Write-Host “Call Details: $CallInfo”
Write-Host “”

Write-Host “— Software Versions —” -ForegroundColor Yellow
[PSCustomObject]@{
“Teams Version” = $TeamsVersion
“Citrix Client” = $CWAClient
“CWA Version” = $CWAVersion
“SlimCore Plugin” = $PluginVersion
“Remote Slimcore Version” = $remoteSlimcoreVersion
“Bridge Version” = $PluginVersion
“Client Platform” = $bridgeVersion
“Webclient Version” = $webClientVersion
“VM Version” = $vmVersion
} | Format-Table -AutoSize

$OSVersion = $Entry.vdiVersionInfo.clientOsVersion
$bridgeVersion = $Entry.vdiVersionInfo.bridgeVersion
$clientPlatform = $Entry.vdiVersionInfo.clientPlatform
$webClientVersion = $Entry.vdiVersionInfo.webClientVersion
$vmVersion = $Entry.vdiVersionInfo.vmVersion
$remoteSlimcoreVersion = $Entry.vdiVersionInfo.remoteSlimcoreVersion

Write-Host “— Active Peripherals —” -ForegroundColor Yellow
Write-Host “Microphone: $MicLabel” -ForegroundColor White
Write-Host “Speaker: $SpkLabel” -ForegroundColor White
Write-Host “Webcam: $CamLabel” -ForegroundColor White
Write-Host “”

$Index++
}

Write-Host “=========================================================”“`


Thanks for sharing. This is great!!


Good stuff, thx a lot


it would be great to monitor these items by default for Citrix sessions (should be relevant for AVD / W365 and Horizon as well I guess)


Great stuff, I’ll have a look

Continue reading and comment on the thread ‘How to Diagnose Microsoft Teams SlimCore Optimization in Citrix and Other VDI Environments Using PowerShell Scripts’.  Not a member? Join Here!


Categories: All Archives, ControlUp Scripts & Triggers
Topics: Automation, Automation & Alerting, Citrix, Citrix Workspace App, ControlUp Insights, Logs, Microphones, Microsoft, Microsoft Azure, Microsoft Azure Virtual Desktop (AVD), Microsoft Teams, Microsoft Windows, PowerShell, Reporting, Scripts, Security, Unified Communications, VDI, VMware, VMware Horizon, VMware Horizon View

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp DEX solutions.

Browse here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2026 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..