Need help with vssetup.powershell?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

microsoft
155 Stars 35 Forks MIT License 108 Commits 0 Opened issues

Description

PowerShell module to interact with Visual Studio Setup

Services available

!
?

Need anything else?

Contributors list

# 178,153
redis-windows 2.5K visual-studio top 10
# 82,681
FiraCode 52.4K Python top 10
N/A
csla 833 visual-studio top 10
# 183,293
chocolatey 2.8K visual-studio top 10
# 78,509
choco 7.1K visual-studio top 10

Visual Studio Setup PowerShell Module

build status: master build status: develop github release github releases: all PowerShell Gallery

This PowerShell module contains cmdlets to query instances of Visual Studio 2017 and newer. It also serves as a more useful sample of using the Setup Configuration APIs than the previously published samples though those also have samples using VB and VC++.

Installing

With Windows Management Framework 5.0 or newer (which installs PowerShell and comes with Windows 10), or PowerShellGet for PowerShell 3.0 or 4.0, you can download and install this module easily.

Install-Module VSSetup -Scope CurrentUser

To install for all users, pass

AllUsers
instead of
CurrentUser
, or just leave the
-Scope
parameter out of the command entirely.

You can also download the ZIP package from the Releases page on this project site and extract to a directory named VSSetup under a directory in your

$env:PSMODULEPATH
.
Expand-Archive VSSetup.zip "$([Environment]::GetFolderPath("MyDocuments"))\WindowsPowerShell\Modules\VSSetup"

Using

You can query all usable instances of Visual Studio and other products installed by the Visual Studio installer.

Get-VSSetupInstance

To get the instance for a specific installation directory, you can run the following.

Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'

If you want to select the latest instance that contains the .NET desktop development workload, you can pipe all instances - usable or not - to

Select-VSSetupInstance
that provides more fine grain control over which instances you enumerate.
Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStudio.Workload.ManagedDesktop' -Latest

Feedback

To file issues or suggestions, please use the Issues page for this project on GitHub.

License

This project is licensed under the MIT license.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.