Skip to main content

Windows VSCode Policy

Overview

The Windows VSCode Policy lets administrators manage Visual Studio Code extension-update settings on enrolled Windows devices.

The Swif agent merges the configured values into the user’s VS Code settings file:

%APPDATA%\Code\User\settings.json

Existing VS Code settings that are unrelated to this policy are preserved.

With this policy, you can:

  • Enable or disable automatic extension updates

  • Delay automatic extension updates for a specified number of hours

  • Apply consistent extension-update behavior across managed Windows devices

Requirements

Requirement

Details

Supported platform

Windows 10 or later

Device ownership

Company-owned and BYOD

Device management

The device must be enrolled in Swif

Application

Microsoft Visual Studio Code

Extension update delay

VS Code 1.125 or later

Agent connectivity

The Swif agent must be online to receive the policy

This policy manages Microsoft Visual Studio Code. Applications that use a different settings location, such as VS Code Portable, VSCodium, or Cursor, are not managed by this policy.

How the Policy Works

When the policy is installed, the Swif agent updates the applicable keys in:

%APPDATA%\Code\User\settings.json

The agent preserves other user settings, such as themes, formatting preferences, editor behavior, and language-specific configurations.

This policy manages VS Code user settings. It is different from Microsoft’s native registry-based enterprise policies, which can display settings as Managed by your organization and prevent users from changing them.

If you require locked VS Code settings, review Microsoft’s centrally managed VS Code policies.

Create the Policy

  1. Sign in to the Swif Admin Dashboard.

  2. Go to Device Management > Policies.

  3. Create a new policy.

  4. Select Windows VSCode Policy.

  5. Enter a descriptive policy name.

  6. Configure the extension-update settings.

  7. Assign the policy to a test device or device group.

  8. Allow the device to check in.

  9. Restart VS Code and verify the settings.

  10. Expand the assignment after testing succeeds.

Recommended Configuration

For most organizations:

Setting

Recommended value

Extensions Auto Update

Enabled

Extensions Auto Update Delay

2 hours

Enabling automatic updates helps installed extensions receive bug fixes and security updates.

Organizations that require additional time to review newly published extension versions can configure a longer delay. Balance the review period against the risk of postponing important security fixes.


Policy Settings

Extensions Auto Update

Controls whether Visual Studio Code automatically updates installed extensions.

Value

Behavior

Enabled

VS Code automatically updates eligible installed extensions.

Disabled

Extensions are not updated automatically through the general auto-update process.

Swif default:

Disabled

When automatic updates are enabled:

  • VS Code checks for available extension updates.

  • Enabled extensions are updated automatically.

  • Disabled extensions are not automatically updated until they are enabled again.

  • Users may be prompted to restart the extension host after an update.

This setting does not install new extensions. It controls updates for extensions that are already installed.

Extensions Auto Update Delay

Specifies how many hours VS Code waits after an extension update is published before installing it automatically.

This setting appears only when Extensions Auto Update is enabled.

Value

Behavior

0

Installs eligible updates as soon as they are available.

2

Waits two hours before automatically installing an update.

Greater than 2

Provides a longer review or observation period before installation.

Swif default:

2

Minimum value:

0

The value must be a whole number of hours and cannot be negative.

The delay applies only to automatic updates. If a user selects Update manually, VS Code can install the update immediately without waiting for the configured delay.

Important: Configurable extension-update delay requires VS Code 1.125 or later. Earlier versions may ignore this setting.

Microsoft documents this behavior under Extension auto-update.

Configuration Examples

Automatically Update Extensions After Two Hours

Use this configuration to follow VS Code’s standard update delay.

Setting

Value

Extensions Auto Update

Enabled

Extensions Auto Update Delay

2

This configuration provides a short delay while allowing extensions to receive updates automatically.

Install Extension Updates Without a Delay

Setting

Value

Extensions Auto Update

Enabled

Extensions Auto Update Delay

0

Use this configuration when extension updates should be installed as soon as they become available.

A zero-hour delay increases exposure to newly published extension versions that have not yet been reviewed broadly.

Apply a 24-Hour Review Period

Setting

Value

Extensions Auto Update

Enabled

Extensions Auto Update Delay

24

This configuration waits 24 hours after publication before an eligible extension update is installed automatically.

The delay does not constitute security review or extension approval. Administrators should separately control which extensions users are permitted to install when extension governance is required.

Require Manual Extension Updates

Setting

Value

Extensions Auto Update

Disabled

When automatic updates are disabled, users or administrators must update extensions manually.

Use this configuration only when the organization has a documented extension-testing and update process. Leaving extensions outdated can expose devices to unresolved security or compatibility issues.

Verify the Policy

After assigning the policy:

  1. Confirm that the Windows device is online in Swif.

  2. Confirm that the policy reports as installed.

  3. Sign in to the affected Windows user account.

  4. Close and reopen Visual Studio Code.

  5. Press Ctrl+, to open Settings.

  6. Search for:

Extensions Auto Update
  1. Confirm that the displayed value matches the Swif policy.

  2. If automatic updates are enabled, search for:

Extensions Auto Update Delay
  1. Confirm that the configured delay is displayed.

  2. Optionally open the Command Palette with Ctrl+Shift+P and run:

Preferences: Open User Settings (JSON)
  1. Verify that the applicable extension-update settings are present.

  2. Confirm that unrelated settings remain unchanged.

Do not expose or copy the complete settings.json file into a support request without reviewing it first. The file may contain internal URLs, paths, extension configuration, or other organization-specific information.

Interaction With User Settings

The Windows VSCode Policy updates user-level VS Code settings rather than replacing the entire settings file.

As a result:

  • Unrelated user preferences are preserved.

  • Each Windows user profile has its own settings.json file.

  • The policy must be verified while signed in as the affected user.

  • Settings Sync may copy VS Code preferences between devices.

  • Another management tool or script that edits the same keys can create conflicting behavior.

Avoid managing the same extension-update settings through multiple systems unless their precedence and update timing have been tested.

Extension Security Considerations

VS Code extensions run with the permissions available to Visual Studio Code and can access source code, files, processes, network resources, and development credentials depending on their functionality.

Automatic updates reduce the time required to receive security fixes, but they also allow newly published extension versions to be installed without individual administrator approval.

For stronger extension governance:

  • Approve trusted publishers and extensions.

  • Review extension permissions and publisher history.

  • Remove unused extensions.

  • Monitor extensions installed on managed devices.

  • Use an appropriate update delay.

  • Maintain a process for urgent security updates.

  • Consider Microsoft’s native enterprise extension controls when allowlisting or locked enforcement is required.

  • Test critical development extensions before broad deployment.

This policy controls update timing. It does not restrict which extensions users can install.


Troubleshooting

The Policy Reports Installed but VS Code Does Not Change

Check the following:

  • The device runs Windows 10 or later.

  • Microsoft Visual Studio Code is installed.

  • The affected user has signed in to Windows.

  • The policy was assigned to the correct device.

  • The Swif agent is online.

  • VS Code was restarted after the policy installed.

  • The correct Windows user’s settings are being inspected.

  • Another script, policy, or synchronization service is not changing the same setting.

  • The installation is not using VS Code Portable or another VS Code-based editor.

The standard user settings path is:

%APPDATA%\Code\User\settings.json

The Update Delay Does Not Appear

The delay is displayed only when Extensions Auto Update is enabled.

Also confirm that:

  • VS Code is version 1.125 or later.

  • The delay is a whole number.

  • The value is 0 or greater.

  • The device received the latest policy.

  • VS Code was restarted after the policy changed.

Extensions Update Immediately Despite the Delay

A manual update bypasses the automatic update delay.

Confirm whether the user selected:

  • Update

  • Update All Extensions

  • A command that explicitly checks for and installs extension updates

Also check whether another management process or extension deployment tool installed the update independently.

Extensions Do Not Update Automatically

Confirm that:

  • Extensions Auto Update is enabled.

  • The extension itself is enabled.

  • The configured delay has elapsed.

  • VS Code can connect to the configured extension marketplace.

  • A proxy, firewall, or content filter is not blocking the download.

  • The extension was not installed from a source that disables automatic updating.

  • VS Code is running and has had time to check for updates.

Extensions installed from a VSIX file have automatic updates disabled by default.

A Disabled Extension Was Not Updated

This is expected. When automatic updates are enabled, VS Code automatically updates enabled extensions. A disabled extension is normally updated when it is enabled again.

Other VS Code Settings Were Removed

The Swif agent is designed to merge the configured extension-update keys while preserving unrelated values.

If unrelated settings are missing:

  • Confirm that another tool is not replacing settings.json.

  • Review whether Settings Sync restored an older configuration.

  • Check whether the file contains invalid syntax.

  • Confirm that the correct Windows user profile is being inspected.

  • Record the policy status and contact Swif Support.

The User Can Still Change the Setting

This policy manages the user’s settings.json file. It is not the same as a locked Windows registry-based VS Code enterprise policy.

If the setting must be displayed as organization-managed and protected from user modification, use the applicable Microsoft VS Code enterprise policy in addition to evaluating the Swif configuration.

Remove the Policy

To stop managing these settings:

  1. Remove the policy assignment or delete the policy in Swif.

  2. Allow the device to check in.

  3. Restart Visual Studio Code.

  4. Review the user’s VS Code settings.

Removing a policy assignment does not necessarily restore a previous user-selected value. Verify the resulting configuration after removal and set the desired value if necessary.

Notes

  • The policy supports Windows 10 or later.

  • Company-owned and BYOD devices are supported.

  • The policy manages Microsoft Visual Studio Code user settings.

  • The settings file is located at %APPDATA%\Code\User\settings.json.

  • Unrelated settings are preserved during the merge.

  • Extensions Auto Update defaults to disabled in Swif.

  • Extensions Auto Update Delay defaults to two hours.

  • The minimum delay is zero hours.

  • The delay is available only when automatic updates are enabled.

  • A manual update bypasses the configured delay.

  • Disabled extensions are not automatically updated.

  • The policy does not install, approve, allowlist, or block extensions.

  • VS Code Portable and other VS Code-based editors can use different settings locations.

Summary

The Windows VSCode Policy controls how Microsoft Visual Studio Code updates installed extensions on managed Windows devices.

For most deployments:

  1. Enable Extensions Auto Update.

  2. Configure an update delay appropriate for the organization.

  3. Assign the policy to a test group.

  4. Restart VS Code after deployment.

  5. Verify the settings under the affected Windows user account.

  6. Combine update management with an extension approval and security-review process.

Related Resources

Did this answer your question?