Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

Restoring Windows Terminal Link in Windows 11

Posted on March 30, 2022March 30, 2022

When I moved to Windows 11, one of the little things I liked was the addition of Windows Terminal to the start jump list. You get this list by right-clicking on the Start icon in the taskbar or pressing Win+x. Over the years, this list has moved from having an option to open a command prompt to open Windows PowerShell. So I was pleased when it changed to opening Windows Terminal. Especially with an "as Admin" option.

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

Unfortunately, the latest beta release reverts to Windows PowerShell. I've been told that this was a deliberate decision to avoid having a dead link if the user uninstalled Windows Terminal. Don't even get me started.

I reached out to Paul Thurrott on Twitter regarding this issue, and he provided some references on modifying the start list. Here's how I restored my Windows Terminal link.

Link Groups

The links are stored under %LOCALAPPDATA%, specifically C:\Users\Jeff\AppData\Local\Microsoft\Windows\WinX. Under WinX are subfolders Group1, Group2, and Group3. These directories correspond to the start menu groupings, starting from the bottom. The Group3 folder is where I want to create my link.

Group3 folder

You can see the existing links. The numbering reflects how they are ordered on the list. I opened this folder in Windows Explorer and right-clicked to create a new shortcut.

I need the path to the Windows Terminal program, so I grabbed that using PowerShell and pasted it.

(Get-Command wt.exe).source | Set-Clipboard
create the shortcut

Next, give the shortcut a name.

name the shortcut

After finishing, I knew I wanted the shortcut to run as elevated. If you haven't done this before, open the link properties and click Advanced.

advanced properties

This isn't that difficult.

set run as administrator

Check the box and click OK.

Register the Link

Simply having the link in the folder is not sufficient. It apparently needs some sort of Windows voodoo to "register" it. To accomplish this bit of magic, I needed to download a utility called hashlnk.exe. Download the zip file from https://github.com/riverar/hashlnk/blob/master/bin/hashlnk_0.2.0.0.zip and extract the file. I saved it to C:\Work. I was hesitant about downloading a random file, but it was created by a Microsoft MVP years ago and is an open-source project on Github. If it makes you feel better, I didn't have any problems, and ESET didn't raise any flags.

The name of the link file will be used in the list, so I renamed my link.

rename-item '.\Windows Terminal.lnk' -NewName 'Windows Terminal (Admin).lnk'

You'll need the full path to the link file.

$linkpath = (get-item 'Windows Terminal (Admin).lnk').fullname

The registration command is straightforward. Specify the path to the hashlnk.exe, assuming it isn't in your path and the link path as a parameter.

C:\work\hashlnk.exe $linkpath
running hashlnk.exe

That's it. You need to log off and back on or kill the Explorer process.

get-process explorer | stop-process

Now I have the Windows Terminal shortcut.

updated WinX list

I experimented with adding a number to the .lnk file to control the order, but the number was included in the list output so I deleted the file and started again without it. Once you run hashlnk.exe, I don't think you can do anything else with the .lnk file, so make sure everything is configured the way you want before using it.

Summary

If there is a newer or better way to achieve the same result, especially one that lends itself to automation, I'd love to hear about it. I'm very curious about new alternatives to hashlnk.exe.


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

3 thoughts on “Restoring Windows Terminal Link in Windows 11”

  1. Pingback: Restoring Windows Terminal Link in Windows 11 - The Lonely Administrator - Syndicated Blogs - IDERA Community
  2. Josh King says:
    March 31, 2022 at 11:01 pm

    > to avoid having a dead link if the user uninstalled Windows Terminal

    🤦‍♂️ Just… have a fallback? It seems like a no brainer to me, no WT then fallback to Windows PowerShell.

    Even better, tie it to the default terminal setting (https://devblogs.microsoft.com/commandline/windows-terminal-as-your-default-command-line-experience/)?

    1. Jeffery Hicks says:
      April 1, 2022 at 7:37 am

      It is all very odd. If I never had Windows Terminal installed would I ever have seen that link? Hopefully not. This is another Windows 11 detail that gets in the way.

Comments are closed.

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d