A .vbs file is a Virtual Basic script written in the VBScript scripting language. It contains code that can be executed within Windows via the Windows-based script host (Wscript.exe), to perform certain admin and processing functions.
VBScript is a legacy Scripting engine component, and Microsoft does not recommend using this component unless it is really required. Use this component at your own risk, this might contain security vulnerabilities.
Starting with Windows 11 build 25309, you can now uninstall the VBScript feature if wanted.
This tutorial will show you how to install or uninstall the VBScript optional feature for all users in Windows 11.
You must be signed in as an administrator to install or uninstall the VBScript optional feature.
- Option One: Install or Uninstall VBScript Feature in Settings
- Option Two: Install or Uninstall VBScript Feature using Command
1 Open Settings (Win+I).
2 Click/tap on Apps on the left side, and click/tap on Optional features on the right side. (see screenshot below)
3 Do step 4 (add) or step 5 (remove) below for what you want.
4 Install VBScript Feature
This is the default setting.
A) Click/tap on the View features button. (see screenshot below)
B) Check VBSCRIPT, and click/tap on Next. (see screenshot below)
C) Click/tap on Install to confirm. (see screenshot below)
D) You can now close Settings if you like.
5 Uninstall VBScript Feature
A) Under Installed features, click/tap on VBSCRIPT to expand it open. (see screenshot below)
B) Click/tap on the Uninstall button.
C) You can now close Settings if you like.
1 Open Windows Terminal (Admin), and select Windows PowerShell or Command Prompt.
2 Copy and paste the command below you want to use into Windows Terminal (Admin), and press Enter. (see screenshots below)
Default - Install VBScript Feature
DISM /Online /Add-Capability /CapabilityName:VBSCRIPT~~~~
Uninstall VBScript Feature
DISM /Online /Remove-Capability /CapabilityName:VBSCRIPT~~~~
3 When prompted to restart the computer, type Y to restart now.