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
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

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name EnterDeveloperPowerShell -RequiredVersion 1.0.2

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name EnterDeveloperPowerShell -Version 1.0.2

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2021 tcartwright. All rights reserved.

Package Details

Author(s)

  • tcartwright

Functions

Invoke-VSDeveloperPowershell

Dependencies

This module has no dependencies.

Release Notes

1.0.0 20210815
* Initial  release to PS Gallery

FileList

Version History

Version Downloads Last updated
1.0.12 1,083 8/28/2021
1.0.11 16 8/16/2021
1.0.10 13 8/16/2021
1.0.9 13 8/16/2021
1.0.8 11 8/16/2021
1.0.7 14 8/16/2021
1.0.6 12 8/16/2021
1.0.5 12 8/15/2021
1.0.4 12 8/15/2021
1.0.3 12 8/15/2021
1.0.2 (current version) 12 8/15/2021
1.0.1 12 8/15/2021
1.0.0 15 8/15/2021
Show less