PowerShell Getting Started
Getting started means opening PowerShell and running your first commands. You type a command, and PowerShell prints its result.
Check the version
A first command checks the version. This value reports the running version.
$PSVersionTable.PSVersion.ToString()Print a greeting
A second first command prints a greeting. Write-Output prints the value you give it.
Write-Output "Hello from PowerShell"Print a fixed date
A third first command prints a date. The fixed date keeps the result the same every time.
Get-Date -Date "2026-10-28" -Format "yyyy-MM-dd"Example
$PSVersionTable.PSVersion.ToString()
Write-Output "Ready to learn"
Get-Date -Date "2026-10-28" -Format "yyyy-MM-dd"Key points
- Open PowerShell first, then type commands at its prompt.
- A prompt is the marker that waits for your next command.
- Write-Output prints the value you give it.
- Get-Date reports a date.
- The version value reports which PowerShell version is running.
In this example, the first line prints the PowerShell version, the second line prints a short message, and the third line prints a fixed date.
Note
On Linux, you start PowerShell by typing pwsh.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
Which command reports the PowerShell version?