# Your First Script

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.

![Cheat sheet for the lesson Your First Script: 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.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/cc6cfbd976634f16ae414a27f1c2f2e5.webp)

- Category: PowerShell
- Level: Apprentice
- Tags: comment, Current Directory, get-psdrive, powershell, script-file
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-your-first-script-cheat-sheet
