shortcuts mentioned in `I never knew Windows had a "hidden" collection of tools` article


Recommended Posts

Posted (edited)


Hello,

In @Usama Jawad96's I never knew Windows had a "hidden" collection of tools article, I had posted a list of a number of shortcuts I had added to my Windows 11 Start Menu for ease of access to various utilities built into Windows.

I got a few likes and questions about it, so I put a link up to a .ZIPped archive of the shortcuts here on OneDrive, but I also received some additional feedback from @thartist and @binaryzero, who asked if a scripted version was available to create these shortcuts  As this is something I had built organically by adding one or two at a time over many years starting in the Windows 95 era, I never got around to scripting them; instead just copying them to new systems as part of my customization and tweaking process.  Still, that sounded like an interesting idea.

The exact location on my computer is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft\Tools\, however, I did not want to share something that made global changes like that to peoples' systems, so this script creates a C:\Temp\Shortcuts\ directory for its first command, and then creates the shortcuts in that location.  I figure that anyone who wishes to use them can move them to a more suitable location on their computer.  

New-Item -Path "c:\temp\shortcuts" -ItemType Directory -Force

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Add or Remove a Program.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\appwiz.cpl"
$Shortcut.IconLocation = "%windir%\System32\appwiz.cpl,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Adjust DPI Scaling.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\DpiScaling.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Backup and Restore User Credentials.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\credwiz.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Calculator.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "calculator:///"
$Shortcut.IconLocation = "%windir%\System32\calc.exe,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Color Management.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\colorcpl.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Create a Repair Disc.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\recdisc.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Create a user for this PC.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "ms-cxh:localonly"
$Shortcut.IconLocation = "%windir%\System32\Netplwiz.exe,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\DirectX Diagnostics.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\dxdiag.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Disk Indexing Options.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll"
$Shortcut.IconLocation = "%windir%\System32\srchadmin.dll,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Installation Express.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\iexpress.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Internet Explorer Control Panel.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\inetcpl.cpl"
$Shortcut.IconLocation = "%windir%\System32\inetcpl.cpl,26"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\KGL Check.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "ms-gamingoverlay://kglcheck/"
$Shortcut.IconLocation = "%windir%\System32\GamePanel.exe,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Local Machine Certificate Manager.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\certlm.msc"
$Shortcut.IconLocation = "%windir%\System32\certmgr.dll,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Local User and Groups Manager.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\lusrmgr.msc"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Local User and Groups Manager.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\lusrmgr.msc"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Manage All Users.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\control.exe userpasswords2"
$Shortcut.IconLocation = "%windir%\System32\Netplwiz.exe,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Manage Current User.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\control.exe userpasswords"
$Shortcut.IconLocation = "%windir%\System32\Netplwiz.exe,0"
$Shortcut.Save()

# The Microsoft Media Creation Tool is not installed by default and can be
# downloaded from Microsoft's website.  This shortcut assumes the program
# has been saved to the location specified in the shortcut's Target.Path
$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Media Creation Tool.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%ProgramFiles(x86)%\Microsoft\Media Creation Tool\MediaCreationTool.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Microsoft Support Diagnostic Tool.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\msdt.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Network Connections.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\ncpa.cpl"
$Shortcut.IconLocation = "%windir%\System32\ncpa.cpl,0"
$Shortcut.Save()

# originally this was "C:\Windows\System32\control.exe netconnections" but 
# PowerShell 7 had trouble processing that, so I substituted a shell:::
# command with a GUID, which seems to work fine
$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Network Properties.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\ODBC Data Source Administrator.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\odbcad32.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\On-Screen Keyboard.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\osk.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Private Character Editor.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\eudcedit.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Problem Steps Recorder.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\psr.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Registry Editor.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\regedit.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Registry Editor32.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\regedt32.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\System Configuration Utility.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\msconfig.exe"
$Shortcut.IconLocation = "%windir%\System32\msconfig.exe,0"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\System Information.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\msinfo32.exe"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\TPM Management.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\tpm.msc"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Windows Firewall.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "%windir%\System32\wf.msc"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\Windows Update.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "ms-settings:windowsupdate?winsettingshome"
$Shortcut.IconLocation = "%windir%\System32\shell32.dll,314"
$Shortcut.Save()

$WshShell = New-Object -ComObject WScript.Shell
$ShortcutPath = "c:\temp\shortcuts\WLTUC.lnk"
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = "ms-cxh://WLTUC/"
$Shortcut.IconLocation = "%windir%\System32\Netplwiz.exe,0"
$Shortcut.Save() 

This was done quickly by me and with minimal testing under Windows 11 25H2 and PowerShell 7.  I will be the first to admit I am not that great at PowerShell, so please review carefully and test extensively.

If anyone has questions, constructive feedback, suggestions for improvement, etc., feel free to reply.

Regards,

Aryeh Goretsky

 

Edited by goretsky
updated for clarity

Hey, it's cool that you bothered to do it and mention us, i don't need it btw but I'm following along, but I wonder if instead of that C:\temp\shortcuts dir, you couldn't better use a system variable like %user%\Desktop\Shortcuts or however they're used? Would be tidier, right?

<#
.SYNOPSIS
    Creates Windows shortcut (.lnk) files for common tools/settings.

.DESCRIPTION
    Builds shortcuts in the target folder using WScript.Shell.
    Refactored to avoid repeated code by using a helper function and a shortcut definition list.

.PARAMETER ShortcutRoot
    The folder where the shortcuts will be created. Defaults to "C:\temp\shortcuts".

.EXAMPLE
    .\New-SystemShortcuts.ps1

.EXAMPLE
    .\New-SystemShortcuts.ps1 -ShortcutRoot "D:\Shortcuts"

.NOTES
    File Name       : New-SystemShortcuts.ps1
    Author          : binaryzero
    Version         : 0.2.0
    Date Created    : 2026-05-28
    Last Modified   : 2026-05-28
#>

[CmdletBinding()]
param(
    [Parameter()]
    [string]$ShortcutRoot = "C:\temp\shortcuts"
)

function New-Shortcut {
	# Function to create shortcuts
    
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$Name,

        [Parameter(Mandatory = $true)]
        [string]$TargetPath,

        [Parameter()]
        [string]$IconLocation
    )

    $shortcutPath = Join-Path -Path $ShortcutRoot -ChildPath "$Name.lnk"
    $shortcut = $WshShell.CreateShortcut($shortcutPath)
    $shortcut.TargetPath = $TargetPath

    if (-not [string]::IsNullOrWhiteSpace($IconLocation)) {
        $shortcut.IconLocation = $IconLocation
    }

    $shortcut.Save()
}

Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

# Ensure destination folder exists
New-Item -Path $ShortcutRoot -ItemType Directory -Force | Out-Null

# Reuse one COM object for all shortcut creation
$WshShell = New-Object -ComObject WScript.Shell

# Define shortcuts to create
$shortcuts = @(
    @{ Name = "Add or Remove a Program"; TargetPath = "%windir%\System32\appwiz.cpl"; IconLocation = "%windir%\System32\appwiz.cpl,0" }
    @{ Name = "Adjust DPI Scaling"; TargetPath = "%windir%\System32\DpiScaling.exe" }
    @{ Name = "Backup and Restore User Credentials"; TargetPath = "%windir%\System32\credwiz.exe" }
    @{ Name = "Calculator"; TargetPath = "calculator:///"; IconLocation = "%windir%\System32\calc.exe,0" }
    @{ Name = "Color Management"; TargetPath = "%windir%\System32\colorcpl.exe" }
    @{ Name = "Create a Repair Disc"; TargetPath = "%windir%\System32\recdisc.exe" }
    @{ Name = "Create a user for this PC"; TargetPath = "ms-cxh:localonly"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
    @{ Name = "DirectX Diagnostics"; TargetPath = "%windir%\System32\dxdiag.exe" }
    @{ Name = "Disk Indexing Options"; TargetPath = "%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll"; IconLocation = "%windir%\System32\srchadmin.dll,0" }
    @{ Name = "Installation Express"; TargetPath = "%windir%\System32\iexpress.exe" }
    @{ Name = "Internet Explorer Control Panel"; TargetPath = "%windir%\System32\inetcpl.cpl"; IconLocation = "%windir%\System32\inetcpl.cpl,26" }
    @{ Name = "KGL Check"; TargetPath = "ms-gamingoverlay://kglcheck/"; IconLocation = "%windir%\System32\GamePanel.exe,0" }
    @{ Name = "Local Machine Certificate Manager"; TargetPath = "%windir%\System32\certlm.msc"; IconLocation = "%windir%\System32\certmgr.dll,0" }
    @{ Name = "Local User and Groups Manager"; TargetPath = "%windir%\System32\lusrmgr.msc" }
    @{ Name = "Manage All Users"; TargetPath = "%windir%\System32\control.exe userpasswords2"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
    @{ Name = "Manage Current User"; TargetPath = "%windir%\System32\control.exe userpasswords"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }

    # Assumes MediaCreationTool.exe exists at this path
    @{ Name = "Media Creation Tool"; TargetPath = "%ProgramFiles(x86)%\Microsoft\Media Creation Tool\MediaCreationTool.exe" }

    @{ Name = "Microsoft Support Diagnostic Tool"; TargetPath = "%windir%\System32\msdt.exe" }
    @{ Name = "Network Connections"; TargetPath = "%windir%\System32\ncpa.cpl"; IconLocation = "%windir%\System32\ncpa.cpl,0" }

    # PowerShell 7 can have trouble with: control.exe netconnections
    @{ Name = "Network Properties"; TargetPath = "shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}" }

    @{ Name = "ODBC Data Source Administrator"; TargetPath = "%windir%\System32\odbcad32.exe" }
    @{ Name = "On-Screen Keyboard"; TargetPath = "%windir%\System32\osk.exe" }
    @{ Name = "Private Character Editor"; TargetPath = "%windir%\System32\eudcedit.exe" }
    @{ Name = "Problem Steps Recorder"; TargetPath = "%windir%\System32\psr.exe" }
    @{ Name = "Registry Editor"; TargetPath = "%windir%\regedit.exe" }
    @{ Name = "Registry Editor32"; TargetPath = "%windir%\System32\regedt32.exe" }
    @{ Name = "System Configuration Utility"; TargetPath = "%windir%\System32\msconfig.exe"; IconLocation = "%windir%\System32\msconfig.exe,0" }
    @{ Name = "System Information"; TargetPath = "%windir%\System32\msinfo32.exe" }
    @{ Name = "TPM Management"; TargetPath = "%windir%\System32\tpm.msc" }
    @{ Name = "Windows Firewall"; TargetPath = "%windir%\System32\wf.msc" }
    @{ Name = "Windows Update"; TargetPath = "ms-settings:windowsupdate?winsettingshome"; IconLocation = "%windir%\System32\shell32.dll,314" }
    @{ Name = "WLTUC"; TargetPath = "ms-cxh://WLTUC/"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
)

# Create shortcuts based on the defined list
foreach ($s in $shortcuts) {
    New-Shortcut -Name $s.Name -TargetPath $s.TargetPath -IconLocation $s.IconLocation
}

# Completion message
Write-Host "Created $($shortcuts.Count) shortcuts in '$ShortcutRoot'."

# End of script

Tbh, I'd take it a step further and use a json to provide the shortcut name and file path. ymmv.

On 27/05/2026 at 02:48, thartist said:

Hey, it's cool that you bothered to do it and mention us, i don't need it btw but I'm following along, but I wonder if instead of that C:\temp\shortcuts dir, you couldn't better use a system variable like %user%\Desktop\Shortcuts or however they're used? Would be tidier, right?

Hello,

I did not want to forcibly create the shortcuts in a place where a person who was just curious about them would have them added to their system without their explicit approval and a chance to try them out, see if they were useful and either delete them or move them to their own Start Menu.  That is why I chose that specific directory instead of somewhere inside the user's Start Menu at  %APPDATA%\Microsoft\Windows\Start Menu\ or system's Start Menu at %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu.  I figured that if a person wanted to keep them after exploring them or perhaps making changes (delete, add, change an icon, whatever), they could then move them to a location that best met their needs.

One of the things I do not like about a lot of software these days is that oftentimes the installers do not give the user (or at least the person installing it) choices about where software is installed to, whether the software changes any file associations, whether the program runs on startup or not, has shortcuts created for it on the Start Menu and/or Desktop and so forth. 

While I certainly wasn't attempt to create an installer here, just a very quick script to create the shortcuts, I did not want to do anything that made changes to the user's system.  Sticking the files in a directory located at C:\Temp\Shortcuts\ seemed the best way to accomplish this.

Regards,

Aryeh Goretsky
 

On 27/05/2026 at 22:49, binaryzero said:
<#
.SYNOPSIS
    Creates Windows shortcut (.lnk) files for common tools/settings.

.DESCRIPTION
    Builds shortcuts in the target folder using WScript.Shell.
    Refactored to avoid repeated code by using a helper function and a shortcut definition list.

.PARAMETER ShortcutRoot
    The folder where the shortcuts will be created. Defaults to "C:\temp\shortcuts".

.EXAMPLE
    .\New-SystemShortcuts.ps1

.EXAMPLE
    .\New-SystemShortcuts.ps1 -ShortcutRoot "D:\Shortcuts"

.NOTES
    File Name       : New-SystemShortcuts.ps1
    Author          : binaryzero
    Version         : 0.2.0
    Date Created    : 2026-05-28
    Last Modified   : 2026-05-28
#>

[CmdletBinding()]
param(
    [Parameter()]
    [string]$ShortcutRoot = "C:\temp\shortcuts"
)

function New-Shortcut {
	# Function to create shortcuts
    
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$Name,

        [Parameter(Mandatory = $true)]
        [string]$TargetPath,

        [Parameter()]
        [string]$IconLocation
    )

    $shortcutPath = Join-Path -Path $ShortcutRoot -ChildPath "$Name.lnk"
    $shortcut = $WshShell.CreateShortcut($shortcutPath)
    $shortcut.TargetPath = $TargetPath

    if (-not [string]::IsNullOrWhiteSpace($IconLocation)) {
        $shortcut.IconLocation = $IconLocation
    }

    $shortcut.Save()
}

Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

# Ensure destination folder exists
New-Item -Path $ShortcutRoot -ItemType Directory -Force | Out-Null

# Reuse one COM object for all shortcut creation
$WshShell = New-Object -ComObject WScript.Shell

# Define shortcuts to create
$shortcuts = @(
    @{ Name = "Add or Remove a Program"; TargetPath = "%windir%\System32\appwiz.cpl"; IconLocation = "%windir%\System32\appwiz.cpl,0" }
    @{ Name = "Adjust DPI Scaling"; TargetPath = "%windir%\System32\DpiScaling.exe" }
    @{ Name = "Backup and Restore User Credentials"; TargetPath = "%windir%\System32\credwiz.exe" }
    @{ Name = "Calculator"; TargetPath = "calculator:///"; IconLocation = "%windir%\System32\calc.exe,0" }
    @{ Name = "Color Management"; TargetPath = "%windir%\System32\colorcpl.exe" }
    @{ Name = "Create a Repair Disc"; TargetPath = "%windir%\System32\recdisc.exe" }
    @{ Name = "Create a user for this PC"; TargetPath = "ms-cxh:localonly"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
    @{ Name = "DirectX Diagnostics"; TargetPath = "%windir%\System32\dxdiag.exe" }
    @{ Name = "Disk Indexing Options"; TargetPath = "%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll"; IconLocation = "%windir%\System32\srchadmin.dll,0" }
    @{ Name = "Installation Express"; TargetPath = "%windir%\System32\iexpress.exe" }
    @{ Name = "Internet Explorer Control Panel"; TargetPath = "%windir%\System32\inetcpl.cpl"; IconLocation = "%windir%\System32\inetcpl.cpl,26" }
    @{ Name = "KGL Check"; TargetPath = "ms-gamingoverlay://kglcheck/"; IconLocation = "%windir%\System32\GamePanel.exe,0" }
    @{ Name = "Local Machine Certificate Manager"; TargetPath = "%windir%\System32\certlm.msc"; IconLocation = "%windir%\System32\certmgr.dll,0" }
    @{ Name = "Local User and Groups Manager"; TargetPath = "%windir%\System32\lusrmgr.msc" }
    @{ Name = "Manage All Users"; TargetPath = "%windir%\System32\control.exe userpasswords2"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
    @{ Name = "Manage Current User"; TargetPath = "%windir%\System32\control.exe userpasswords"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }

    # Assumes MediaCreationTool.exe exists at this path
    @{ Name = "Media Creation Tool"; TargetPath = "%ProgramFiles(x86)%\Microsoft\Media Creation Tool\MediaCreationTool.exe" }

    @{ Name = "Microsoft Support Diagnostic Tool"; TargetPath = "%windir%\System32\msdt.exe" }
    @{ Name = "Network Connections"; TargetPath = "%windir%\System32\ncpa.cpl"; IconLocation = "%windir%\System32\ncpa.cpl,0" }

    # PowerShell 7 can have trouble with: control.exe netconnections
    @{ Name = "Network Properties"; TargetPath = "shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}" }

    @{ Name = "ODBC Data Source Administrator"; TargetPath = "%windir%\System32\odbcad32.exe" }
    @{ Name = "On-Screen Keyboard"; TargetPath = "%windir%\System32\osk.exe" }
    @{ Name = "Private Character Editor"; TargetPath = "%windir%\System32\eudcedit.exe" }
    @{ Name = "Problem Steps Recorder"; TargetPath = "%windir%\System32\psr.exe" }
    @{ Name = "Registry Editor"; TargetPath = "%windir%\regedit.exe" }
    @{ Name = "Registry Editor32"; TargetPath = "%windir%\System32\regedt32.exe" }
    @{ Name = "System Configuration Utility"; TargetPath = "%windir%\System32\msconfig.exe"; IconLocation = "%windir%\System32\msconfig.exe,0" }
    @{ Name = "System Information"; TargetPath = "%windir%\System32\msinfo32.exe" }
    @{ Name = "TPM Management"; TargetPath = "%windir%\System32\tpm.msc" }
    @{ Name = "Windows Firewall"; TargetPath = "%windir%\System32\wf.msc" }
    @{ Name = "Windows Update"; TargetPath = "ms-settings:windowsupdate?winsettingshome"; IconLocation = "%windir%\System32\shell32.dll,314" }
    @{ Name = "WLTUC"; TargetPath = "ms-cxh://WLTUC/"; IconLocation = "%windir%\System32\Netplwiz.exe,0" }
)

# Create shortcuts based on the defined list
foreach ($s in $shortcuts) {
    New-Shortcut -Name $s.Name -TargetPath $s.TargetPath -IconLocation $s.IconLocation
}

# Completion message
Write-Host "Created $($shortcuts.Count) shortcuts in '$ShortcutRoot'."

# End of script

Tbh, I'd take it a step further and use a json to provide the shortcut name and file path. ymmv.

Hello,

That is a much more elegant solution than my own clumsy implementation.  Thank you for sharing it!

Regards,

Aryeh Goretsky
 

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.