MasonSchleider / PSShellLink

A PowerShell module for viewing and modifying shell link metadata.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PSShellLink

Note: This module is a work in progress!

PSShellLink is a PowerShell module for viewing and modifying Windows shell link metadata.

At the moment, its primary function is to assist in the management of Windows console application settings.

Background Information [ref]

When a console application (e.g., cmd.exe, PowerShell) is launched, its settings (e.g., font, layout, colors) are retreived from the following locations and applied in order (with later settings overriding earlier ones):

  1. Hardcoded settings in conhostv2.dll.
  2. Default settings stored in the registry key HKEY_CURRENT_USER\Console.
  3. Per-application settings stored in subkeys of the above registry key.
    The subkey is assigned one of the following two names:
    1. The path of the console application (substituting \ for _).
    2. The title of the console window.
  4. If the console application was launched from a shortcut, settings stored in the metadata of the shortcut file.

Commands

Get-ShellLink

Retrieves an instance of the ShellLink class referencing a specified shortcut file. The ShellLink class is the principal class utilized by the module's underlying C# library. It contains methods for managing the auxiliary data blocks stored within a shortcut file (primarily the data block containing console properties).

Copy-ConsoleProperties

Copies console properties from one shortcut file to another.

Reset-ConsoleProperties

Resets the console properties of a shortcut file to the default settings found in the Windows Registry.

Export-ConsoleProperties

Exports a shortcut file's console properties to a Windows Registry file.

Get-DefaultConsoleSettings

Retrieves a data structure containing the default console settings found in the Windows Registry.

About

A PowerShell module for viewing and modifying shell link metadata.

License:GNU General Public License v3.0


Languages

Language:C# 62.8%Language:PowerShell 37.2%