In 2024, Microsoft announced its intention to phase out support for VBScript, a scripting language previously favored for automation in Windows environments due to its simplicity and accessibility. VBScript garnered popularity because it included a built-in Windows runtime and access to a vast library of scripts. However, because of its legacy structure and associated vulnerabilities, Microsoft no longer endorses its use.
With the launch of Windows 11 24H2 and Windows Server 2025, VBScript was deprecated, becoming an optional feature in Windows. By default, Windows 11 25H2 has VBScript enabled. However, Microsoft has indicated that in future releases, specifically in 2027, VBScript will be disabled by default and entirely removed from the Windows image.
Users can manage the VBScript feature via the Settings app: navigate to Settings → System → Optional features → View optional features. Here, you can enable or disable the VBScript feature, which is enabled by default.
To verify if the VBScript scripting engine is installed, you can use PowerShell with the command:
Get-WindowsCapability -Online -Name vbs*
To remove the VBScript feature, you can execute the following command:
Remove-WindowsCapability -Online -Name "VBScript~~~~0.0.1.0"
Alternatively, the DISM command can be used:
DISM /Online /remove-Capability /CapabilityName:VBScript
To install VBScript again, use:
DISM /Online /Add-Capability /CapabilityName:VBScript
VBScript remains in use in many corporate environments for automating tasks, particularly within domain Group Policy Objects (GPOs) and deployment scripts. Microsoft advises that existing code using VBScript should be migrated to more modern languages like PowerShell, JavaScript, or Python before complete discontinuation.
Organizations should audit their systems to track any reliance on VBScript. A tool like SYSMON can be employed to monitor events related to VBScript usage. After installing the tool, you can track the usage of the vbscript.dll library with an XML configuration file, enabling visibility of when the VBScript engine is invoked.
Furthermore, to assess what VBScript files have been executed, you can query the Event Viewer for events linked to the .vbs extension. This proactive approach provides insights into active scripts and prepares organizations for the eventual removal of VBScript support.
Despite the deprecation, many legacy scripts, including those for Windows activation, Microsoft Office, and system information, may still rely on VBScript. Therefore, it’s crucial for administrators to begin their transition to modern scripting solutions well in advance of the complete phase-out of VBScript.
