Run It from Anywhere
A script that reads its files from $PSScriptRoot works from any folder; a Scripts folder on your PATH lets you run it by name, pwsh -File starts it from outside PowerShell, and a desktop shortcut with pwsh -File in its target runs it with a double-click.
Updated

- Category
- PowerShell
- Level
- Apprentice
- Tags
- path, powershell, psscriptroot, pwsh, shortcut