Visual Studio Setup PowerShell Module Available

To make the new setup configuration APIs more accessible to developers, we have published the “VSSetup” PowerShell module on powershellgallery.com, making it quick and easy to install.

If you have Windows Management Framework (WMF) 5.0 or newer – installed with Windows 10 – or PowerShellGet for PowerShell 3.0 or 4.0, you can run the following from even an unelevated PowerShell host:

Install-Module VSSetup -Scope CurrentUser

You can also install for all users if you leave off the Scope parameter entirely. You can also download and extract a ZIP archive from our Releases page on the project page.

After installing, you can quickly enumerate all launchable instances you have installed.

Get-VSSetupInstance

If you want to enumerate all instances – even those requiring a reboot or otherwise not complete – you can pass -All.

Get-VSSetupInstance -All

The default display properties present the main information for which end users are probably most interested, but you can pipe the results to select * to see everything.

If you want to select specific instances – like the latest installed instance with the .NET Framework (desktop) workload – you can use Select-VSSetupInstance.

Get-VSSetupInstance | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Workload.ManagedDesktop

More examples are available in our README. You can log bugs and suggestions on the Issues page, and we are happy to consider pull requests. See CONTRIBUTING for developer notes. We appreciate your comments and contributions.