# Scripts

Scripts: A Script Is an Application, Writing Scripts in VS Code, Your First Script, Run It from Anywhere.

Updated: November 10, 2026

1. [A Script Is an Application](https://www.ask-codey.com/lessons/powershell-scripts-are-applications) (Novice): Every application takes something in, does some work and gives something back, and a PowerShell script does the same from a .ps1 text file you can read, which makes it a quick-run application of your own, best at jobs made of files, data, settings and other programs.
2. [Writing Scripts in VS Code](https://www.ask-codey.com/lessons/powershell-scripts-in-vs-code) (Apprentice): VS Code with Microsoft's free PowerShell extension colors a script, suggests commands as you type, underlines problems such as a missing quote or an alias before you run anything, and runs the whole script with F5 in a terminal inside the editor.
3. [Your First Script](https://www.ask-codey.com/lessons/powershell-your-first-script) (Apprentice): A script is a .ps1 file of commands that run from top to bottom, with comments starting with # that say what it does, and you run it from its own folder with .\\ and its name, because PowerShell never looks in the current folder for a command on its own.
4. [Run It from Anywhere](https://www.ask-codey.com/lessons/powershell-run-from-anywhere) (Apprentice): 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.

Source: https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-scripts
