EnterDeveloperPowerShell
1.0.2
This function will enter the Visual Studio Developer Powershell mode, and will return the installation path of the version selected using the $DisplayNameMatch. Allows any powershell instance to enter "Visual Studio Developer Mode".
### NOTES
Depends upon VSWHERE.exe. Requires that at the very least Visual Studio 2017 is installed or greater. Can be used to enter
### NOTES
Depends upon VSWHERE.exe. Requires that at the very least Visual Studio 2017 is installed or greater. Can be used to enter
This function will enter the Visual Studio Developer Powershell mode, and will return the installation path of the version selected using the $DisplayNameMatch. Allows any powershell instance to enter "Visual Studio Developer Mode".
### NOTES
Depends upon VSWHERE.exe. Requires that at the very least Visual Studio 2017 is installed or greater. Can be used to enter the developer powershell for lower versions as long as VSWHERE.EXE is found. [About vshere.exe](https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?using-vswhereexe)
### Examples:
Gets the latest Visual Studio Installed and enters the developer mode for that version
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "latest"
PS> Write-Host "installPath = $installPath"
```
Gets the Visual Studio 2017 IF Installed and enters the developer mode for that version. IF not installed, an exception will be thrown
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "latest"
PS> Write-Host "installPath = $installPath"
```
Shows an example getting the path using regex
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "Visual.*2019"
PS> Write-Host "installPath = $installPath"
```
### Possible Exceptions
- VSWHERE.exe is not found
- No instances are found for the $DisplayNameMatch supplied
- Multiple instances are found for the $DisplayNameMatch supplied
- VsDevCmd.bat could not be found in the install
- The invocation of VsDevCmd.bat fails
Show more
### NOTES
Depends upon VSWHERE.exe. Requires that at the very least Visual Studio 2017 is installed or greater. Can be used to enter the developer powershell for lower versions as long as VSWHERE.EXE is found. [About vshere.exe](https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?using-vswhereexe)
### Examples:
Gets the latest Visual Studio Installed and enters the developer mode for that version
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "latest"
PS> Write-Host "installPath = $installPath"
```
Gets the Visual Studio 2017 IF Installed and enters the developer mode for that version. IF not installed, an exception will be thrown
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "latest"
PS> Write-Host "installPath = $installPath"
```
Shows an example getting the path using regex
```powershell
PS> Import-Module EnterDeveloperPowerShell
PS> $installPath = Invoke-VSDeveloperPowershell -DisplayNameMatch "Visual.*2019"
PS> Write-Host "installPath = $installPath"
```
### Possible Exceptions
- VSWHERE.exe is not found
- No instances are found for the $DisplayNameMatch supplied
- Multiple instances are found for the $DisplayNameMatch supplied
- VsDevCmd.bat could not be found in the install
- The invocation of VsDevCmd.bat fails
Installation Options
Owners
Copyright
(c) 2021 tcartwright. All rights reserved.
Package Details
Author(s)
- tcartwright
Functions
Dependencies
This module has no dependencies.
Release Notes
1.0.0 20210815
* Initial release to PS Gallery
FileList
- EnterDeveloperPowerShell.nuspec
- EnterDeveloperPowerShell.psd1
- EnterDeveloperPowerShell.psm1
Version History
Version | Downloads | Last updated |
---|---|---|
1.0.12 | 1,112 | 8/28/2021 |
1.0.11 | 19 | 8/16/2021 |
1.0.10 | 16 | 8/16/2021 |
1.0.9 | 16 | 8/16/2021 |
1.0.8 | 14 | 8/16/2021 |
1.0.7 | 17 | 8/16/2021 |
1.0.6 | 15 | 8/16/2021 |
1.0.5 | 15 | 8/15/2021 |
1.0.4 | 15 | 8/15/2021 |
1.0.3 | 15 | 8/15/2021 |
1.0.2 (current version) | 15 | 8/15/2021 |
1.0.1 | 15 | 8/15/2021 |
1.0.0 | 18 | 8/15/2021 |