Skip to content

Instantly share code, notes, and snippets.

@AArnott
Created January 26, 2026 18:26
Show Gist options
  • Select an option

  • Save AArnott/3c2b32fab2fe1afdd5ca68e50be2e952 to your computer and use it in GitHub Desktop.

Select an option

Save AArnott/3c2b32fab2fe1afdd5ca68e50be2e952 to your computer and use it in GitHub Desktop.
A powershell script to put on your system PATH so you can add VS tools to your PATH in any terminal.
$vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -format json -latest | ConvertFrom-Json
$instanceId = $vs[0].instanceId
$installationPath = $vs[0].installationPath
Import-Module "$installationPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell $instanceId -SkipAutomaticLocation -Arch x64 -HostArch x64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment