Deploy GitHub Copilot to existing Visual Studio instances

For administrators of Visual Studio 2022 version 17.8 or above, you can deploy GitHub Copilot onto client workstations programmatically with an installation script, just like you deploy other Visual Studio components.

Note that this method does NOT install the GitHub Copilot chat extension.

Pre-requisites

To get started, you need:

Options for deploying GitHub Copilot onto client machines depend on how Visual Studio is currently installed on these machines.

Modify an existing installation to add the GitHub Copilot component

Most of the time, users would've either acquired Visual Studio themselves, or run a development environment setup script on their machine. To add the GitHub Copilot component to an existing installation of Visual Studio, use the installer's modify command from either a command line or PowerShell window.

Sample install instructions

Make sure you're in the Visual Studio Installer directory in the command line or PowerShell window: C:\Program Files (x86)\Microsoft Visual Studio\Installer

$installDir = .\vswhere.exe -products * -version 17.8 -requires Microsoft.VisualStudio.Component.CoreEditor -property installationPath
foreach ($i in $installDir) {
    Write-Host "Adding Copilot to this installed instance" $i
    Start-Process -FilePath .\setup.exe -ArgumentList "modify --installPath ""$i"" --add Component.GitHub.Copilot --passive" -Wait
}

Deploy using a layout

If you're using a layout to deploy Visual Studio across your organization, you first need to add the Component.GitHub.Copilot component to the layout. Then, assuming the client is configured to receive updates from the layout, you can run a modify command as in the previous example to add it to the client.

Refer to the layout documentation for further information.

End user action required

Note that after installing the GitHub Copilot component to the client machines, the end user will need to take the following steps to enable GitHub Copilot:

  1. Log into the GitHub web interface with the GitHub account associated with their Copilot subscription.
  2. Launch Visual Studio 2022 and add their GitHub account to the Visual Studio keychain to activate access.

To learn more, consider exploring the following resources: