Centrally manage VS Code settings with policies

Enterprise policies in Visual Studio Code enable organizations to centrally manage VS Code settings for their development teams to ensure consistency and compatibility across their organization. When a policy value is set, the value overrides the VS Code setting value configured at any level (default, user, and workspace).

IT admins can deploy and enforce specific VS Code configurations on users' devices through different device management solutions. VS Code supports applying policies on Windows, macOS, and Linux.

Settings editor showing that the 'Extensions: Allowed' setting is managed by the organization.

In this article, you learn which enterprise policies are available in VS Code and how to configure them on different operating systems.

Windows group policies

VS Code has support for Windows Registry-based Group Policy.

These profiles can be deployed using Mobile Device Management (MDM) solutions or installed manually on individual devices.

Step 1: Obtain the sample ADMX and ADML files

Starting from VS Code version 1.69, each release ships with a policies directory containing ADMX template files that define the available policies.

You can get the ADMX and ADML files from either an existing installation or by downloading and extracting the VS Code zip archive. Follow these steps to obtain the files:

  1. Download the VS Code zip archive for your version of VS Code.
  2. Extract the zip file to a temporary location.
  3. Navigate to the policies folder in the extracted files. This folder contains the ADMX template files (for example, vscode.admx) and a locales subfolder with ADML files for different languages.

Step 2: Configure policy values

After installing the ADMX and ADML files, configure policy values through your management tool:

  • For Active Directory environments, use the Group Policy Editor (gpedit.msc) and navigate to Computer Configuration > Administrative Templates > Visual Studio Code.
  • For cloud-managed devices, use your MDM solution (for example, Microsoft Intune) to configure the imported VS Code administrative template policies.
  • Open each policy, set it to Enabled or Disabled, and provide any required value in the policy UI.
  • Leave policies in the Not Configured state if you don't want to enforce them.

Configured policy values are written to the registry under Software\Policies\Microsoft\VSCode.

Refer to the policy reference below for details on each policy's accepted values and behavior.

Step 3: Deploy the policies

You can now deploy the configured policies at scale to all relevant devices in your organization using a device management solution. You can manually test the policies on a local Windows machine before deploying them at scale using the Local Group Policy Editor.

Deploy policies at scale

Products such as Microsoft Intune or Active Directory Group Policy can be used to centrally manage device policy at scale across an organization. These solutions allow administrators to deploy the ADMX/ADML files and policy configurations to multiple devices from a central location.

For Active Directory environments, copy the ADMX and ADML files to the Central Store to make the policies available across the domain.

Manually test policies on a local machine

If you want to test the policies on a local Windows machine before deploying them at scale, you can manually install the ADMX/ADML files and configure the policies using the Local Group Policy Editor.

Follow these steps to configure VS Code policies on a local Windows machine:

Step 1: Install the policy definition files

  1. Copy the vscode.admx file to C:\Windows\PolicyDefinitions.
  2. Copy the appropriate ADML file from the locales subfolder (for example, en-US\vscode.adml) to C:\Windows\PolicyDefinitions\<your-locale> (for example, C:\Windows\PolicyDefinitions\en-US).
Note

You need administrator privileges to copy files to the PolicyDefinitions directory.

Step 2: Open the Local Group Policy Editor

  1. Press Windows+R to open the Run dialog.
  2. Type gpedit.msc and press Enter to open the Local Group Policy Editor.
  3. If prompted by User Account Control, select Yes to allow the app to make changes.

Step 3: Navigate to VS Code policies

The VS Code policies are available under both Computer Configuration and User Configuration:

  • Computer Configuration > Administrative Templates > Microsoft VS Code
  • User Configuration > Administrative Templates > Microsoft VS Code
Tip

Computer-level policies take precedence over user-level policies when both are configured.

Step 4: Configure a policy

  1. Select the policy category (either Computer Configuration or User Configuration).
  2. Navigate to Administrative Templates > Microsoft VS Code.
  3. Double-click on the policy you want to configure (for example, Update Mode).
  4. In the policy settings dialog, select Enabled to enforce the policy.
  5. Configure the policy value using the available options or text fields.
  6. Select OK to save the changes.
  7. Close the Local Group Policy Editor.

The policy will take effect the next time VS Code is started. Some policies may require restarting Windows to take effect.

macOS configuration profiles

Configuration profiles manage settings on macOS devices. A profile is an XML file (.mobileconfig) with key/value pairs that correspond to available policies.

These profiles can be deployed using Mobile Device Management (MDM) solutions or installed manually on individual devices.

Step 1: Obtain the sample configuration profile

Starting from VS Code version 1.99, each release ships with a sample .mobileconfig file. Follow these steps to locate the sample file on a macOS device with VS Code installed:

  1. Open Finder and navigate to /Applications.
  2. Right-click on Visual Studio Code.app (or your VS Code variant) and select Show Package Contents.
  3. Navigate to Contents/Resources/app/policies.
  4. Locate the sample .mobileconfig file (for example, vscode-sample.mobileconfig).

Step 2: Configure policy values

  1. Copy the sample .mobileconfig file to a working location (for example, your Desktop or Documents folder).

  2. Open the copied file in a text editor (for example, TextEdit, VS Code, or any XML editor).

  3. Edit the policy values according to your requirements:

    Example policy.json configuration:

    {
      "AllowedExtensions": { "microsoft"