Add-VsDevPwsh7

0.3.0

Locate installed Visual Studio instances via vswhere, generate a startup script that loads complete VS build environment for PowerShell 7.
Supports registering to Windows Registry and adding dedicated profile to Windows Terminal.
通过 vswhere 检索本机已安装的 Visual Studio,生成加载完整编译环境的 PowerShell 7 启动脚本,支持写入注册表注册程序、向 Windows Terminal 添加专属配置项。

Installation Options

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

Install-Script -Name Add-VsDevPwsh7 -RequiredVersion 0.3.0

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

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) 2026 ScriptForge. All rights reserved.

Package Details

Author(s)

  • ScriptForge

Tags

VisualStudio PowerShell7 Developer Terminal

Functions

Test-Is64BitOS Test-ParameterDependency Register-VsDevTerminalToRegistry

Dependencies

This script has no dependencies.

Release Notes

## v0.3.0
- Fix: Fix the problem of failing to register correctly to the registry
- Fix: Fix the issue that the script forcibly overwrites the native -InformationAction common parameter
The original logic hardcoded "$InformationPreference = 'Continue'", which would override custom output policies such as SilentlyContinue / Inquire passed by users;
It is modified to apply the default output level only when the user does not manually specify -InformationAction and there is no preset value in the scope.
- Feat: Add automatic generation of Uninstall.ps1 uninstall script
- Feat: Complete registry uninstall registration logic, support normal uninstall/quiet uninstall
- Optimize: Parameter dependency verification logic, optimize invalid parameter prompt
- Refactor: Overall code structure reconstruction, optimize global variable definition
- Refactor: No additional functional changes
- 修复:修复无法正确注册到注册表的问题
- 修复:解决脚本强制覆盖原生公共参数 -InformationAction 的问题
原有逻辑硬编码赋值 $InformationPreference = 'Continue',会覆盖用户传入的 SilentlyContinue / Inquire 等自定义输出策略;
修改后仅在用户未手动指定 -InformationAction 且当前作用域无预设值时,才启用默认输出等级。
- 新增:自动生成 Uninstall.ps1 卸载脚本
- 新增:补全注册表卸载逻辑,支持常规卸载/静默卸载模式
- 优化:完善参数依赖校验逻辑,优化无效参数提示文案
- 重构:整体代码结构重构,统一全局变量定义方式
- 重构:无额外功能性变更

FileList

Version History

Version Downloads Last updated
0.3.1 9 7/26/2026
0.3.0 (current version) 5 7/26/2026
0.2.3 4 7/24/2026
0.2.2 10 7/23/2026
0.2.1 7 7/23/2026
0.2.0 6 7/23/2026
0.1.3 13 7/20/2026
0.1.2 14 7/20/2026
0.1.1 8 7/20/2026
0.1.0 7 7/20/2026
0.0.1 10 7/18/2026
Show more