Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Enable or Disable VBScript in Windows after Deprecation

December 10, 2025

How to Enable or Disable VBScript in Windows after Deprecation

In 2024, Microsoft announced plans to phase out support for VBScript, a formerly popular Windows scripting language. VBScript scripts remain popular for automation and system management because they are simple, easy to use, and have a transparent code structure based on Visual Basic. Other advantages include the Windows Script Host’s built-in Windows runtime and interpreter, as well as access to an extensive library of ready-made scripts from Microsoft Support and third-party contributors.

However, due to its legacy architecture, numerous vulnerabilities, and potential for malicious use, Microsoft no longer recommends using VBScript. With the release of Windows 11 24H2 and Windows Server 2025, VBScript was deprecated and became an optional system feature (Feature on Demand, FoD). Windows 11 25H2 currently has VBScript enabled by default. However, according to the MSFT roadmap, VBScript will be disabled by default in future Windows releases in 2027. After that, this feature will be completely removed from the Windows image.

VBScript deprecation timelines
Windows users can enable or disable VBScript using the Settings app. Go to Settings -> System -> Optional features -> View optional features. The VBSCRIPT optional feature is enabled by default in Windows. If necessary, you can disable it from here.
Enable or disable VBSCRIPT in Windows 11
You can also check if the VBScript scripting engine is installed on Windows using PowerShell.
Get-WindowsCapability -Online -Name vbs*
Get-WindowsCapability VBScript
To remove the VBScript feature, run the following command:
Remove-WindowsCapability -Online -Name "VBScript~~~~0.0.1.0"
Or use DISM:
DISM /Online /remove-Capability /CapabilityName:VBScript
To install the VBscript feature, run:
DISM /Online /Add-Capability /CapabilityName:VBScript

Or:
Add-WindowsCapability -Online -Name "VBScript~~~~0.0.1.0"
If the VBScript interpreter is missing, files with the .vbs extension will lose their associated execution mappings, resulting in an error when attempting to run any VBS script from the command line.

Program 'slmgr.vbs' failed to run: No application is associated with the specified file for this operation.

VBS script failed to run: No application is associated with the specified file for this operation
An error will appear if you try to run a VBScript via WScript.exe (graphical mode) or Cscript.exe (console mode):
wscript.exe c:\windows\system32\slmgr.vbs

Windows Script Host
There is no script engine for file extension ".vbs"

Windows Script Host There is no script engine for file extension ".vbs"

VBS scripts are still widely used in corporate environments to automate various tasks (especially in domain GPOs, automated deployment scripts, SCCM scripts, and Task Scheduler jobs). Microsoft recommends migrating all used code to more modern script languages, such as PowerShell, JavaScript, and Python, before completely disabling VBScript in Windows.

Before VBScript is globally disabled in Windows, administrators should proactively audit their environments to identify any tasks or processes that still rely on VBS scripts. Use the SYSMON tool to audit events related to the usage of VBS code on corporate computers.
Download the sysmon64.exe to a reference computer. Next, create an XML file to log the usage of the vbscript.dll library:

<Sysmon schemaversion="4.50">
<EventFiltering>
<!-- Tracking the loading of vbscript.dll -->
<ImageLoad onmatch="include">
<ImageLoaded condition="contains">vbscript.dll</ImageLoaded>
</ImageLoad>
</EventFiltering>
</Sysmon>

Save this configuration to an XML file, and then install the Sysmon service and the device driver that will monitor the VBS usage events.
Sysmon64.exe -i sysmon_settings.xml
Sysmon64.exe install driver and service to detect vbscript usage

Or, run the Sysmon64.exe -c sysmon_settings.xml command to update the current Sysmon configuration.

From now on, an event with Event ID 7 (Image loaded: rule: ImageLoad) will be added to the Event Viewer each time the VBScript scripting engine is used. Analyzing events in the Event Viewer -> Applications and Services Logs -> Microsoft -> Windows -> Sysmon -> Operational allows you to identify VBScript usage on a computer.

Sysmon logs can be used to identify the specific VBScript files that were executed, the user who initiated them, and when they were executed.
Sysmon Event ID 7 (VBS Image loaded: rule: ImageLoad)

The following PowerShell script queries the Event Viewer for events that log information about files with the *.VBS extension: Event ID 1: Process Create (rule: ProcessCreate)

Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; Id=1} | ForEach-Object {
$xml = [xml]$_.ToXml()
$processPath = $xml.Event.EventData.Data | Where-Object {$_.Name -eq 'Image'} | Select-Object -ExpandProperty '#text'
$commandLine = $xml.Event.EventData.Data | Where-Object {$_.Name -eq 'CommandLine'} | Select-Object -ExpandProperty '#text'
if ($commandLine -like '*.vbs*') {
[PSCustomObject]@{
TimeCreated = $_.TimeCreated
ProcessPath = $processPath
CommandLine = $commandLine
}
}
}

In my case, I found several VBScript execution events on the computer.
powershell: list vbs engine usage events
Thus, using Sysmon, you can audit VBScript usage events on corporate computers (it is not necessary to enable VBS auditing for all systems simultaneously. Instead, it should be limited to test groups of typical devices.). After identifying the VBS scripts in your environment, evaluate their functional relevance and assess whether their logic can be ported to PowerShell.

The following are typical file extensions that contain VBScript code:

  • .vbs (VBScript)
  • .vba (Visual Basic for Application)
  • .wsf (Windows Script File)
  • .wsh (WSH settings file)


A significant number of VBScript-based scripts are still widely used across Windows environments. For example. These include the Windows activation management command (Slmgr.vbs), the Microsoft Office activation script (Ospp.vbs),the Office removal scripts (Offscrub), the system information display tool (Bginfo), etc. Since Microsoft has not provided replacements for all existing legacy tools, it is unlikely that VBScript will be completely deprecated in the near future. However, corporate administrators should start preparing for this step in advance.

0 comment
0
Facebook Twitter Google + Pinterest
Questions and AnswersWindows 11Windows Server 2025
previous post
Start Menu Not Working (Unresponsive) on Windows Server RDS
next post
Windows: Auto Switch to Strongest Wi-Fi Network

Related Reading

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Fix: Windows Update Tab (Button) is Missing from...

December 16, 2024

Change BIOS from Legacy to UEFI without Reinstalling...

April 23, 2025

How to Prefer IPv4 over IPv6 in Windows...

April 15, 2025

How to Detect Which User Installed or Removed...

June 25, 2025

Find a Process Causing High Disk Usage on...

July 16, 2025

Map a Network Drive over SSH (SSHFS) in...

May 13, 2025

Restrict the Allowed Logon Time for Local Users...

January 3, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Start Menu Not Working (Unresponsive) on Windows Server RDS

    November 27, 2025
  • AppLocker: Configure Application Restriction Policies in Windows

    November 19, 2025
  • Enable/Disable Random Hardware (MAC) Address for Wi-Fi on Windows

    November 14, 2025
  • Automate Software and Settings Deployment with WinGet Configure (DSC)

    November 13, 2025
  • SMB over QUIC: Mount File Share over Internet without VPN on Windows Server 2025

    November 4, 2025
  • How to Find a Previous Computer Name in Windows

    October 28, 2025
  • Stop Windows Server from Auto-Shutdown Every Hour

    October 22, 2025
  • How to Delete a Windows Service via CMD or PowerShell

    October 16, 2025
  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Converting Windows 10 to Enterprise LTSC Without Losing Data
  • Permanently Disable Driver Signature Enforcement on Windows 11
  • How to Remove ‘Some Settings are Managed by Your Organization’ on Windows 11 or 10
  • Fix: Windows Update Tab (Button) is Missing from Settings
  • How to Add or Reinstall the Microsoft PDF Printer on Windows
  • Fix: Your IT Administrator Has Limited Access to Virus & Threat Protection
  • Fix: Multiple Connections to a Server or Shared Resources by the Same User
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top