Back to Blog
Arnošt Havelka

PowerShell Basics

Start with PowerShell Get-Location and Get-ChildItem.

Start Interactive Lesson
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.

Try the command

Try it! See your current location.

Build the command
Get-Location
Get-LocationGets your current working directory path in PowerShell.
Terminal
C:\Users\User>Get-Location

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.

Try the command

List your directory contents!

Build the command
Get-ChildItem
Get-ChildItemLists files and folders in the current directory.
Terminal
C:\Users\User>Get-ChildItem

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 documentation links provide authoritative details for the commands used in this article.