Add cmdlets to install/uninstall the Azure DevOps Shell in, at least, the following targets:
- Windows Terminal
- Windows Start Menu
- Windows Taskbar
Title:
Conditionally create Windows Terminal shortcut for Azure DevOps Shell in WiX installer
Description:
The current WiX-based installer for TfsCmdlets always creates an “Azure DevOps Shell” shortcut pointing to Windows PowerShell. We’d like to enhance both the MSI and new PowerShell-based installers so that, if Windows Terminal is installed on the user’s machine, they create a shortcut opening the “Azure DevOps Shell” profile in Windows Terminal; otherwise they fall back to the existing PowerShell shortcut.
Additionally, we need to introduce two new cmdlets—Install-TfsShell and Uninstall-TfsShell—to provide the same conditional behavior when users install TfsCmdlets via PowerShell Gallery. To fully support Windows Terminal, we’ll ship two JSON profile fragments (one for Windows PowerShell, one for PowerShell Core/7) named “Azure DevOps Shell,” and deploy them alongside the module.
Current Behavior:
- In
Setup/Product.wxs, the Azure DevOps Shell shortcut is hard-coded to launch PowerShell with Import-Module AzureDevOpsShell.
- There are no
Install-TfsShell or Uninstall-TfsShell cmdlets in the module.
- No Windows Terminal profile fragments are provided.
Desired Behavior:
-
Detection
- Detect presence of Windows Terminal (e.g. via registry AppPath lookup for
wt.exe or file search in %LocalAppData%\Microsoft\WindowsApps\wt.exe).
-
MSI Installer
-
If found, create a desktop shortcut targeting:
wt.exe -p "Azure DevOps Shell"
-
If not found, create the legacy PowerShell shortcut as today.
-
PowerShell Gallery Installer
- Implement
Install-TfsShell to perform the same detection and shortcut creation logic at module install time.
- Implement
Uninstall-TfsShell to remove whichever shortcut was created.
-
Windows Terminal Profile Fragments
-
Windows PowerShell profile (AzureDevOpsShell-WinPS.json), with command line:
-
PowerShell Core profile (AzureDevOpsShell-PSCore.json), with command line:
-
Install these fragments into the user’s WT settings folder (e.g. %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles\) on install, and remove them on uninstall.
Proposed Changes:
-
WiX (Product.wxs)
-
PowerShell Module
-
New cmdlets:
Install-TfsShell — detect WT, install the appropriate shortcut, and deploy both profile fragments.
Uninstall-TfsShell — remove the shortcut and both profile fragments.
-
Profile Fragments
- Add
AzureDevOpsShell-WinPS.json and AzureDevOpsShell-PSCore.json under module assets.
- Copy/remove them in the WT settings folder on install/uninstall.
Acceptance Criteria:
- MSI Installer: Creates WT-based shortcut when Windows Terminal is present; otherwise falls back to PowerShell.
- PowerShell Gallery Installer:
Install-TfsShell & Uninstall-TfsShell replicate the same logic.
- Profile Fragments: Both “Azure DevOps Shell (Windows PowerShell)” and “Azure DevOps Shell (PowerShell Core)” profiles appear in Windows Terminal after installation and are removed on uninstall.
- No regressions in existing PowerShell-only scenarios.
References:
Add cmdlets to install/uninstall the Azure DevOps Shell in, at least, the following targets:
Title:
Conditionally create Windows Terminal shortcut for Azure DevOps Shell in WiX installer
Description:
The current WiX-based installer for TfsCmdlets always creates an “Azure DevOps Shell” shortcut pointing to Windows PowerShell. We’d like to enhance both the MSI and new PowerShell-based installers so that, if Windows Terminal is installed on the user’s machine, they create a shortcut opening the “Azure DevOps Shell” profile in Windows Terminal; otherwise they fall back to the existing PowerShell shortcut.
Additionally, we need to introduce two new cmdlets—
Install-TfsShellandUninstall-TfsShell—to provide the same conditional behavior when users install TfsCmdlets via PowerShell Gallery. To fully support Windows Terminal, we’ll ship two JSON profile fragments (one for Windows PowerShell, one for PowerShell Core/7) named “Azure DevOps Shell,” and deploy them alongside the module.Current Behavior:
Setup/Product.wxs, the Azure DevOps Shell shortcut is hard-coded to launch PowerShell withImport-Module AzureDevOpsShell.Install-TfsShellorUninstall-TfsShellcmdlets in the module.Desired Behavior:
Detection
wt.exeor file search in%LocalAppData%\Microsoft\WindowsApps\wt.exe).MSI Installer
If found, create a desktop shortcut targeting:
If not found, create the legacy PowerShell shortcut as today.
PowerShell Gallery Installer
Install-TfsShellto perform the same detection and shortcut creation logic at module install time.Uninstall-TfsShellto remove whichever shortcut was created.Windows Terminal Profile Fragments
Windows PowerShell profile (
AzureDevOpsShell-WinPS.json), with command line:{ "name": "Azure DevOps Shell (Windows PowerShell)", "commandline": "powershell.exe -NoExit -Command Import-Module AzureDevOpsShell", "icon": "ms-appx:///ProfileIcons/PowerShell.png", "startingDirectory": "%USERPROFILE%" }PowerShell Core profile (
AzureDevOpsShell-PSCore.json), with command line:{ "name": "Azure DevOps Shell (PowerShell Core)", "commandline": "pwsh.exe -NoExit -Command Import-Module AzureDevOpsShell", "icon": "ms-appx:///ProfileIcons/PowerShellCore.png", "startingDirectory": "%USERPROFILE%" }Install these fragments into the user’s WT settings folder (e.g.
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles\) on install, and remove them on uninstall.Proposed Changes:
WiX (
Product.wxs)Add
<AppSearch>or<DirectorySearch>+<FileSearch>to set aWTPATHproperty forwt.exe.Define two mutually-exclusive
<Component>entries underDesktopFolder:WTPATH, targeting[WTPATH]with-p "Azure DevOps Shell".NOT WTPATH, targeting PowerShell as today.PowerShell Module
New cmdlets:
Install-TfsShell— detect WT, install the appropriate shortcut, and deploy both profile fragments.Uninstall-TfsShell— remove the shortcut and both profile fragments.Profile Fragments
AzureDevOpsShell-WinPS.jsonandAzureDevOpsShell-PSCore.jsonunder module assets.Acceptance Criteria:
Install-TfsShell&Uninstall-TfsShellreplicate the same logic.References: