PowerShell Lesson 1: Basics — Cmdlets and Help

📎 This article includes 2 downloadable practice files ↓

⏱ 1 min read

📘 PowerShell Beginner Course · Lesson 1 of 6

PowerShell commands are called cmdlets and follow a Verb-Noun pattern: Get-Date, Get-ChildItem, Copy-Item, Remove-Item.

“`powershell
Get-Date -Format “dd-MM-yyyy HH:mm”
Get-Command -Verb Get # discover commands
Get-Help Get-ChildItem -Examples # learn with examples
“`

  • Press Tab to complete names and parameters.
  • Aliases exist (ls, dir, cd), but use full names in scripts.

Running scripts

Save code as .ps1. If Windows blocks it, allow your own scripts for your user: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned (check company policy first), or run once with powershell -ExecutionPolicy Bypass -File script.ps1.

💡 Windows PowerShell 5.1 comes with Windows; PowerShell 7 (pwsh) is the newer cross-platform version. Scripts in this course work in both.

Practice

Run the script and try Get-Help on two other cmdlets.

📎 Practice files for this article

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *