Finding Your Way
Where you are, what's around you, how to get anywhere and how to read what you find. The pilot chapter (see the defaults).
Updated
Where You Are
- Where Am I? Get-Location and Paths (Novice): Get-Location tells you which folder PowerShell is working in, and the path it prints is that folder's full address, from the drive letter down through every folder to the one you're in.
- Looking Around: Get-ChildItem (Novice): Get-ChildItem lists what's inside a folder, with a row for each folder and file that shows what kind of thing it is, when it last changed, its size and its name, and -Force shows the hidden ones too.
Getting Around
- Moving Around: Set-Location, .. and Tab (Novice): Set-Location moves PowerShell into another folder, by a relative path from where you are or an absolute one from the drive, and .., ~ and Tab completion make every move shorter.
Reading and Remembering
- Reading Files: Get-Content (Novice): Get-Content prints a text file's lines right in PowerShell, by its name or its path, more shows a long file one screen at a time, and edit opens a file you want to change.
- Your Command History (Apprentice): PowerShell remembers the commands you type, so the up arrow, Ctrl+R, Get-History and the prediction list bring back a long command instead of making you type it again.
Exercise: Find Your Way
- Exercise: Find Your Way (Novice): Explore Camp Bluejay's folders with Get-Location, Get-ChildItem, Set-Location and Get-Content, write six answers in answers.txt, and let a Pester check tell you which are right.