Insidethe.com

Insidethe.com

Random Life and Technology Bits

Report Shortcut Properties

When working with a folder that contains several shortcuts, it can be tedious to check the properties of each shortcut. This PowerShell script loops over all of the shortcuts in the folder and reports the name of the executable, start in path, and command line arguments in table format.

$path = Read-Host "Enter the path to search for shortcuts"; Get-ChildItem $path -Filter *.lnk | Select-Object @{Name='Shortcut';Expression={$.Name}}, @{Name='Target';Expression={(New-Object -ComObject WScript.Shell).CreateShortcut($.FullName).TargetPath}}, @{Name='Arguments';Expression={(New-Object -ComObject WScript.Shell).CreateShortcut($.FullName).Arguments}}, @{Name='StartIn';Expression={(New-Object -ComObject WScript.Shell).CreateShortcut($.FullName).WorkingDirectory}} | Format-Table -AutoSize

Who Knows a Mountain?

Who knows a mountain?
One who has gone
To worship its beaty
In the dawn;
One who has slept
On its breast at night;
One who has measured
His strength to its height;

One who has followed
Its longest trail,
And laughed in the face
Of its fiercest gale;
One who has scaled its peaks,
And has trod
Its cloud-swept summits
Alone with Gold.

Ethel Romig Fuller