Centrally manage VS Code settings with policies
AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Centrally manage VS Code settings with policies View as Markdown Ask in VS Code Ask in VS Code Insiders 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. Go directly to your task: Deploy policies on Windows . Deploy policies on macOS . Deploy policies on Linux .
Verify applied policies . Look up a policy . In this article, you learn which enterprise policies are available in VS Code and how to configure them on different operating systems. Choose policy values by following the guidance for extensions , AI features , telemetry , and updates . For AI controls, also review precedence and management scope . Important Sample policy files are configuration examples, not a recommended organizational baseline.
Before deployment, remove policies you don't intend to enforce and verify the remaining values on a test device. Windows group policies VS Code has support for Windows Registry-based Group Policy . You can deploy policies through Active Directory Group Policy or a device management solution such as Microsoft Intune. Use the Local Group Policy Editor to test policies on an individual device. 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: Download the VS Code zip archive for your version of VS Code. Extract the zip file to a temporary location. Navigate to the policies folder in the extracted files. This folder contains the ADMX template file (for example, VSCode.admx ) and a folder for each language, such as en-us , with the ADML file for that language.
Step 2: Install or import the policy templates Make the templates available to your management tool before configuring values: For Active Directory environments, copy the ADMX and language-specific ADML files to the Central Store . For cloud-managed devices, import the ADMX and ADML files into your management solution, then configure and assign the imported administrative template policies. For a local test, install the files as described below.
Install templates for a local test Copy the VSCode.admx file to C:\Windows\PolicyDefinitions . Copy the ADML file from the folder for your language (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 and a Windows edition that includes the Local Group Policy Editor.
Step 3: Configure policy values For a domain deployment, edit the Group Policy Object that applies to your target devices or users. For a local test, run gpedit.msc to open the Local Group Policy Editor. The policies are grouped by feature under: Computer Configuration > Administrative Templates > Visual Studio Code User Configuration > Administrative Templates > Visual Studio Code Tip Computer-level policies take precedence over user-level policies when both are configured.
For example, to turn off Visual Studio Code's auto-update: Under Visual Studio Code , open Update and then UpdateMode . Select Enabled , then choose none in the policy's value dropdown. Select OK to save the changes. For a Boolean policy, select Enabled and use the checkbox in the policy's options to set its value to true or false . The policy's Enabled state means that its configured value is enforced; it is not the value itself.
Use Not Configured when you don't want the Group Policy Object to enforce that policy. Configured values are written under Software\Policies\Microsoft\VSCode in the machine or user registry hive, depending on the scope you chose. Step 4: Deploy and verify the policies Apply the Group Policy Object or assign the policy configuration through your device management solution to a test group first. After the device receives the configuration, restart VS Code and follow Verify policy enforcement .
For the UpdateMode example, confirm that the report lists UpdateMode with the value none and that the application's updater is disabled. This policy does not control package-manager or extension updates . 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: Open Finder and navigate to /Applications . Right-click on Visual Studio Code.app (or your VS Code variant) and select Show Package Contents . Navigate to Contents/Resources/app/policies . Locate the file with the .mobileconfig extension.
Step 2: Configure policy values Copy the sample .mobileconfig file to a working location (for example, your Desktop or Documents folder). Open the copied file in a text editor (for example, TextEdit, VS Code, or any XML editor). Find the application payload dictionary inside the PayloadContent array. Replace the corresponding policy entries with the values you want to enforce. For example: < key > AllowedExtensions </ key > < string > {"microsoft": true, "github": true} </ string > < key > UpdateMode </ key > < string > start </ string > < key > EnableFeedback </ key > < true /> < key > TelemetryLevel </ key > < string > off </ string > This is a fragment of the application payload, not a complete configuration profile.
Keep the profile's metadata and enclosing XML structure. Object-valued policies such as AllowedExtensions use JSON encoded inside an XML <string> element. Remove the <key> element and its associated value for each policy you don't want to enforce. Don't add duplicate entries for a policy. Save the .mobileconfig file. Important Check both the profile's XML syntax and any JSON-encoded policy values before deployment. If a value isn't applied, run Developer: Policy Diagnostics and check the Window log for errors by running Developer: Show Logs and selecting Window .
Step 3: Deploy the policies You can now deploy the configured policies at scale to all relevant devices in your organization with an MDM solution. You can manually test the policies on a local machine before deploying them at scale. Deploy profiles at scale For enterprise deployments across multiple devices, use Mobile Device Management (MDM) solutions such as: Microsoft Intune Apple Business Manager with MDM For installation and removal steps for your macOS version, refer to Apple's configuration profile documentation .
Manually test policies on a local machine Configure policies manually Follow these steps to manually test your VS Code policy configuration on a macOS device before deploying at scale: Step 1: Install the configuration profile Save your edited .mobileconfig file. Double-click the .mobileconfig file in Finder. Open System Settings > General > Device Manageme
The rest of this page is on the live site.