Back to Blog
Arnošt Havelka

PowerShell Basics

Start with PowerShell Get-Location and Get-ChildItem.

Start Interactive Lesson
PowerShell Basics

PowerShell Basics

Welcome to PowerShell! Microsoft's powerful command-line shell brings object-oriented programming to the terminal. In this lesson, you'll learn the foundational commands for navigating PowerShell.

Finding Your Location

In PowerShell, cmdlets (command-lets) follow a Verb-Noun naming convention. Get-Location tells you where you are in the file system.

Usage:Get-Location
Get-Location
Gets your current working directory path in PowerShell.

Real-World Examples

Find your current path:

Command Prompt
C:\Users\User>Get-Location

Listing Items with Get-ChildItem

To see what's in your current directory, use Get-ChildItem. It shows all files and folders.

Usage:Get-ChildItem
Get-ChildItem
Lists files and folders in the current directory.

See your files and folders:

Command Prompt
C:\Users\User>Get-ChildItem

PowerShell's Verb-Noun Convention

Notice how PowerShell commands are self-documenting? Get-Location clearly gets your location, and Get-ChildItem gets child items. This pattern makes PowerShell intuitive once you learn the common verbs.


Knowledge Check

1 / 3

What cmdlet shows your current directory?

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.

Up Next

The Dir Command

Master the art of listing files.