Manage - .net Runtimes
Summary
This script ensures that the system is running the latest supported versions of .NET runtimes and SDKs while removing unsupported versions to maintain a clean and secure environment. It manages the installation, uninstallation, and listing of .NET runtimes and SDKs on a Windows system.
NOTE:
- Uninstalling/Installing SDK will uninstall/Install the associated version of AspNetCoreRuntime, DesktopRuntime and Runtime
- Uninstalling/Installing DesktopRuntime will Uninstall/Install the associated version of Runtime
Dependencies
Sample Run

Global Variables
| Name | Value | Accepted Values | Description |
|---|---|---|---|
| Debug | False | False, True | When True, enables informational logging; when False (default), informational logs are suppressed to avoid adding entries to the h_scripts table. Set to True to assist with troubleshooting. |
| ScriptEngineEnableLogger | False | False, True | When True, enables final (success/failure) logging; when False (default), these logs are suppressed to avoid adding entries to the h_scripts table. Set to True to assist with troubleshooting. |
User Parameters
| Name | Example | Mandatory | Description |
|---|---|---|---|
Action | List Install Uninstall Renew | False | Specifies the action to perform. Valid values are:
list |
Type | Sdk Runtime Desktopruntime aspNetCoreRuntime all | False | Specifies the type of .NET component to manage. Valid values are:
desktopRuntime |
Output
- Script Logs