PowerShell module to interact with Visual Studio Setup
Перейти к файлу
Jiwon Lee 2b745e992a
Update .vsts-compliance.yml (#82)
* Update .vsts-compliance.yml

* Delete apiscan secret variable group ref
2024-05-01 11:14:22 -07:00
.config Update compliance build to run API scan and log bugs (#80) 2024-02-28 14:40:53 -08:00
.nuget fixing package to use the correct latest version 2022-01-28 15:45:39 -08:00
build Update MicroBuildCodesignVerify build task version (#81) 2024-03-19 13:01:28 -07:00
docker Discover framework subdir 2024-02-07 11:39:17 -08:00
docs/VSSetup Add -RequireAny to change behavior of -Require 2018-01-26 08:46:55 -08:00
pkg/VSSetup Convert signproj to sdk project 2024-02-07 16:24:02 +00:00
src/VSSetup.PowerShell Fix build issues 2024-02-07 09:47:28 -08:00
test/VSSetup.PowerShell.Test Fix build issues 2024-02-07 09:47:28 -08:00
tools Discover framework subdir 2024-02-07 11:39:17 -08:00
.editorconfig Fix build issues 2024-02-07 09:47:28 -08:00
.gitattributes Add .gitignore and .gitattributes. 2017-01-12 10:30:45 -08:00
.gitignore Enable signing 2018-06-28 15:42:14 -07:00
.vsconfig Fix build issues 2024-02-07 09:47:28 -08:00
.vsts-ci.yml Update compliance build to run API scan and log bugs (#80) 2024-02-28 14:40:53 -08:00
.vsts-compliance.yml Update .vsts-compliance.yml (#82) 2024-05-01 11:14:22 -07:00
CODE_OF_CONDUCT.md Add Code of Conduct 2019-05-13 16:24:43 -07:00
CONTRIBUTING.md Migrate PR build to Azure Pipelines 2019-01-03 18:06:14 -08:00
Directory.build.props Add Directory.build.props 2024-02-07 16:24:02 +00:00
LICENSE.txt Initial projects and configuration 2017-01-12 12:01:54 -08:00
README.md Add Code of Conduct 2019-05-13 16:24:43 -07:00
SECURITY.md Microsoft mandatory file (#73) 2022-09-08 16:39:46 -07:00
VSSetup.PowerShell.sln Expose module versions in $VSSetupVersionTable 2017-09-28 14:27:16 -07:00
azure-pipelines.yml Convert CI pipeline to MicroBuild template 2024-02-06 23:40:43 +00:00
stylecop.json Initial projects and configuration 2017-01-12 12:01:54 -08:00
version.json Revert "Update version" (#64) 2021-06-02 15:21:01 -07:00

README.md

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 opencode@microsoft.com with any additional questions or comments.