Get-Command to find commands, Get-Help <command> -Examples to see how they work, and verb-noun cmdlets such as Get-Service, Restart-Service, Get-ChildItem and Test-NetConnection for daily tasks. Windows Server 2019, 2022 and 2025 include Windows PowerShell 5.1, and scripts run by default under the RemoteSigned execution policy.
Before you start
- Sign in with Remote Desktop or the VNC console.
- Most admin tasks need an elevated window (run as administrator). Commands that change the system fail with an access-denied error in a normal window.
How to open PowerShell as administrator
- Desktop Experience
- Server Core
Select Start, type
PowerShell, right-click Windows PowerShell and choose Run as administrator. The title bar starts with Administrator:.How PowerShell commands are named
Cmdlets (PowerShell commands) use a Verb-Noun pattern:Get-Service reads services, Stop-Service stops one, Set-TimeZone changes a setting. Parameters start with a hyphen: Get-Service -Name W3SVC. Press Tab to complete command and parameter names.
How to find commands and get help
Get-Help shows only basic information until you download them. Do that once, in an admin window:
Get-Help <command> -Online opens the Microsoft Learn page for that command in your browser.
Commands you will use every day
System information
Get-Volume shows each drive with its free and total space.
Services
Get-Service. Here W3SVC stands for the IIS web service and sshd for OpenSSH Server.
Processes
Files and folders
-Tail 50 shows the last 50 lines. Adding -Wait keeps the file open and prints new lines as they are written, like tail -f on Linux; press Ctrl+C to stop.
Download and unzip
-UseBasicParsing avoids a security prompt and stops the downloaded page from running script (Invoke-WebRequest on Microsoft Learn).
Network
Test-NetConnection shows TcpTestSucceeded : True when the port answers. Get-NetTCPConnection -State Listen lists every port the server is listening on.
Restart and shut down
How the pipeline works
The| (pipe) passes objects from one command to the next. PowerShell passes whole objects with properties, not just text, so you can filter and sort on any property:
How to run a PowerShell script
Save commands in a file ending in.ps1, for example C:\Scripts\cleanup.ps1, and run it:
Windows PowerShell 5.1 or PowerShell 7?
PowerShell 7 installs side by side with 5.1. Microsoft recommends the MSI package for Windows Server; on Windows Server 2025 with Desktop Experience you can also use
winget install --id Microsoft.PowerShell --source winget (Microsoft Learn). For server administration, 5.1 is enough to start.
Frequently asked questions
What is the difference between PowerShell and Command Prompt?
Command Prompt (cmd.exe) runs older commands and batch files. PowerShell runs those same tools plus cmdlets that return objects, which makes filtering, scripting and remote management much easier. Most Microsoft documentation for Windows Server now uses PowerShell.
Is PowerShell case-sensitive?
No.get-service and Get-Service do the same thing. Some values you pass, such as winget package Ids with -e, can be case-sensitive.
How do I see my command history?
RunGet-History, or press the Up arrow to step through earlier commands.
Can I use Linux commands like ls and cat?
Yes, as aliases:ls and dir run Get-ChildItem, and cat runs Get-Content. Their options are PowerShell’s, not Linux’s.
Related guides
VPS and dedicated server guides
Every guide in this section.
Install software with winget
Package manager on Windows Server 2025.
Install roles and features
Install-WindowsFeature explained.
Enable OpenSSH Server
Run PowerShell over SSH.
Use Event Viewer to find errors
Read Windows logs.
Checked against Microsoft Learn: PowerShell 5.1 cmdlet reference, about_Execution_Policies, SConfig and Install PowerShell on Windows on 4 November 2026. Not tested on a live Windows server for this page.
Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026