Skip to content

PowerShell Basics for Windows Administrators

Admin
October 5, 2026
7 min read
Beginner
πŸ’» Target OS: Windows Server 2025 / 2022

Before you begin

  • Applies to:Windows PowerShell administration basics.
  • Where to start:Open PowerShell on a Windows practice machine and check its version before running the examples.
  • What you need:Use a regular account for read-only exercises. Use an authorized administrator session for steps that require elevation.
Guide tools
Guide tools
0/0 Steps (0%)

PowerShell is a command shell and scripting language. Many built-in commands use a Verb-Noun name, such as Get-Process. Unlike a traditional text-only pipeline, PowerShell passes .NET objects between commands, so you can select properties and sort results without parsing screen text.

The examples use read-only commands first, then create a small practice folder under your user profile. You do not need an administrator session for this guide.


01

View the PowerShell Edition and Version

Orientation

Current Windows client and server releases include Windows PowerShell 5.1; older Windows versions may include an earlier release. PowerShell 7 is a separate product that can be installed side by side and is launched with pwsh. Commands and modules can differ between editions, so check the session before following instructions written for a specific version.

Terminal window
$PSVersionTable.PSEdition
$PSVersionTable.PSVersion
Get-Location
❯ Illustrative Output (Results Vary)
Desktop
Major Minor Build Revision
----- ----- ----- --------
5 1 26100 1
Path
----
C:\Users\Sam

02

Use Get-Command and Get-Help

Learn the Tools

Search command names with Get-Command, then read syntax or examples with Get-Help. Local help may show only a short summary if help files are not installed; -Online opens the official help page in a browser.

Terminal window
Get-Command -Noun Process
Get-Help Get-Process -Examples
Get-Help Get-ChildItem -Online
❯ Illustrative Output (Results Vary)
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-Process 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Stop-Process 3.1.0.0 Microsoft.PowerShell.Management

03

Use PowerShell Location and Listing Commands

Paths

Get-Location shows the current directory, Set-Location changes it, and Get-ChildItem lists its contents. The common aliases are pwd, cd, and dir. Add -Force to include hidden items; it does not bypass access permissions.

Terminal window
Set-Location $HOME
Get-Location
Get-ChildItem -Force | Select-Object Mode, Length, LastWriteTime, Name
❯ Illustrative Output (Results Vary)
Path
----
C:\Users\Sam
Mode Length LastWriteTime Name
---- ------ ------------- ----
d----- 10/05/2026 9:00 AM Documents
-a---- 284 10/04/2026 4:12 PM notes.txt

04

Work Inside a Lab Folder in Your Profile

Practice

Create a dedicated folder under your profile, write a sample file, and read it back. Set-Content replaces the file if it already exists, so the example uses a new lab file name. Review a target path before using a command that overwrites or removes files.

Terminal window
$Lab = Join-Path $HOME 'PowerShell-Basics-Lab'
New-Item -ItemType Directory -Path $Lab -Force
$SampleFile = Join-Path $Lab 'status.txt'
Set-Content -LiteralPath $SampleFile -Value 'Status: ready'
Get-Content -LiteralPath $SampleFile
❯ Illustrative Output (Results Vary)
Status: ready

05

Select Properties After Filtering Results

Objects and Pipelines

The pipeline operator | passes objects to the next command. Here, Where-Object filters running processes, Sort-Object orders them by accumulated CPU time, and Select-Object chooses columns to display. The CPU value is not an instantaneous percentage.

Terminal window
Get-Process |
Where-Object { $_.CPU -ne $null } |
Sort-Object CPU -Descending |
Select-Object -First 5 Name, Id, CPU
❯ Illustrative Output (Results Vary)
Name Id CPU
---- -- ---
chrome 10424 182.34
explorer 6112 48.12
powershell 9236 2.80

References

Comments