Search courses, chapters, or pages...
Open a PowerShell tab in a terminal and verify what you are running with $PSVersionTable. Recognize the difference between PowerShell 7, Windows PowerShell, Command Prompt, and Bash before you trust examples or commands.
Use what you learned in the previous lesson to solve real-world problems.
Read the path shown in the prompt and confirm it with Get-Location or pwd. Connect the current location to what relative paths like . and .. will mean when you run a command.
Check what you understood with a short quiz.
Move deliberately with Set-Location or cd using absolute paths, relative paths, .., and ~. Practice changing folders and checking location again before doing any work that depends on the current directory.
Run a single command by separating the command name, parameter names, switches, and values. Use quoted strings when a value has spaces, and notice how PowerShell returns output or messages after you press Enter.
Use PSReadLine editing keys to fix a command before it runs: arrows, Home, End, Backspace, Delete, and Ctrl+Left or Ctrl+Right. Treat the command line like a draft you can revise instead of something you must type perfectly.
Use Up Arrow, Down Arrow, Ctrl+R history search, and Tab completion to reuse commands and complete names safely. Check the completed line carefully before pressing Enter, especially if it came from history.
Tell normal output apart from warnings, errors, and prompts that need a response. Read the message before retrying so you know whether nothing happened, something partly happened, or PowerShell is waiting for you.
Wrap paths with spaces in quotes and know when PowerShell treats a path as one value. Use -LiteralPath when characters such as brackets should be treated as real filename characters instead of patterns.
Recognize how * and ? can match many files or folders at once. Practice checking what a wildcard selects before using it with commands that rename, move, copy, or remove anything.
Use Get-ChildItem, dir, ls, or Test-Path to inspect targets before changing them. Confirm that the files, folders, or names you are about to affect are the ones you actually intend.
Add -WhatIf to supported commands to see the action PowerShell would take without performing it. Use -Confirm when you want PowerShell to ask before each risky operation proceeds.
Press Ctrl+C to interrupt a command that is running too long or doing the wrong thing. Assume some work may already have happened, then inspect the result before running another corrective command.
Use Esc or Ctrl+C to abandon a half-written command, including a continuation prompt that appears as >>. Recognize that PowerShell is waiting for the rest of an unfinished expression, not ignoring you.
Review this chapter with practice based on your mistakes.