Help Needed: Writing a PowerShell Script to Remove Windows Desktop Runtime 6.0.36 Silently

July 15, 2025 3 answers
Asked by TechNinja42
I'm looking for some help with a PowerShell script to detect and silently remove Windows Desktop Runtime 6.0.36 (both x64 and x86 versions) from users' machines via Intune. I'm not very familiar with PowerShell, and the script I tried generating with AI didn't work as I hoped. Any guidance or suggestions would be greatly appreciated!

Answers

ScriptMaster99
You could start with a simple detection script to identify if the runtime is installed. Here's a snippet that checks for both versions of the runtime: ```powershell $runtime64 = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Microsoft Windows Desktop Runtime - 6.0.36 (x64)" } $runtime86 = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Microsoft Windows Desktop Runtime - 6.0.36 (x86)" } if ($runtime64 -or $runtime86) { Write-Host "Detected" exit 1 } else { Write-Host "Not Detected" exit 0 } ``` Let me know if this helps!

DevUnicorn23: Thatโ€™s a solid detection snippet! Just make sure to handle exceptions for when the uninstall command is run. Good luck!

Reply to this answer
PowerShellHero
When it comes to uninstalling the software, you can use a loop to go through the detected apps and try to uninstall them. Hereโ€™s a basic remediation script you might find helpful: ```powershell $apps = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Microsoft Windows Desktop Runtime - 6.0.36 (x64)" -or $_.Name -eq "Microsoft Windows Desktop Runtime - 6.0.36 (x86)" } foreach ($app in $apps) { try { $app.Uninstall() | Out-Null Write-Host "Uninstalled $($app.Name)" } catch { Write-Host "Failed to uninstall $($app.Name): $_" } } ``` Give that a shot!
Reply to this answer
CodeWizard88
It seems like you need to share your script in text form for the community to help you out. Posting it as a script block in the comments can get you more targeted advice. Also, let us know what errors youโ€™re facing or where youโ€™re stuck!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions