Skip to content

Instantly share code, notes, and snippets.

@sxlderek
Created February 18, 2022 18:46
Show Gist options
  • Select an option

  • Save sxlderek/70a2beda38160f4d4576b7e377e5c310 to your computer and use it in GitHub Desktop.

Select an option

Save sxlderek/70a2beda38160f4d4576b7e377e5c310 to your computer and use it in GitHub Desktop.
create desktop shortcut to microsoft windows terminal
# download the ico
$myurl="https://raw.githubusercontent.com/microsoft/terminal/master/res/terminal.ico"
iwr -OutFile "$env:LOCALAPPDATA\\wt.ico" -uri $myurl
 
# create shortcut
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$env:USERPROFILE\Desktop\Windows Terminal.lnk")
$Shortcut.TargetPath = "$env:LOCALAPPDATA\Microsoft\WindowsApps\wt.exe"
$ShortCut.IconLocation = "$env:LOCALAPPDATA\\wt.ico";
$Shortcut.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment