Almost everything on Windows Server can be done with the mouse. A few commands are still worth knowing: they are faster, they work when a window does not open, and you can copy their answer into a support ticket. Each table on this page is one kind of task, and the links lead to the guides that explain a topic in full.
The examples use Windows Server 2025. Run the commands in PowerShell as Administrator: right-click the Start button and choose Terminal (Admin). How to connect: How to Connect to Windows Server With Remote Desktop.
Four Keys That Save the Most Time
| Key | What it does |
|---|---|
| Tab | Completes the name of a command, file or folder you started to type. Press it again for the next match. |
| Arrow up | Brings back the previous command, so that you can run it again or correct it. |
| Ctrl+C | Stops the command that is running. |
| Right-click | Pastes the text you copied into the window. |
Files and Folders
| Command | What it does |
|---|---|
Get-Location | Shows the folder you are in. |
Get-ChildItem | Lists the files of the folder. dir and ls do the same. |
Set-Location D:\Data | Goes to a folder. cd does the same, cd .. goes one level up. |
New-Item -ItemType Directory -Path D:\Data\Photos | Creates a folder, with the folders above it if they are missing. |
Copy-Item notes.txt copy.txt | Copies a file. For a folder: Copy-Item Data Data-copy -Recurse. |
Move-Item old.txt new.txt | Renames a file or folder, or moves it to another folder. |
Remove-Item notes.txt | Deletes a file. For a folder with everything in it: Remove-Item Data-copy -Recurse. The recycle bin is not used. |
Get-Content app.log -Tail 20 | Shows the last 20 lines of a text file. With -Wait it keeps showing new lines. |
Select-String -Path D:\Logs\*.log -Pattern "error" | Finds a word in files. |
Get-ChildItem D:\ -Recurse -Filter *.log | Finds files by name in a folder and all folders below it. |
For large folders: Copy Large Folders on Windows Server With Robocopy. From and to your computer: Transfer Files to Windows Server With SFTP.
Disks, Memory and Programs
| Command | What it does |
|---|---|
Get-Volume | Lists the drives with their size and free space. |
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 5 | Shows the five programs that use the most memory. |
Stop-Process -Id 1234 | Ends the program with this number (Id). What was not saved in it is lost. |
Get-Service Spooler | Shows whether a service runs. |
Restart-Service Spooler | Restarts a service. Start-Service and Stop-Service work the same way. |
More: Windows Server Is Slow? See What Uses the Processor, Memory, Disk and Network, How to Use Additional Disks on Windows Server, Check Disk Health on Windows Server, Keep a Program Running on Windows Server.
Network
| Command | What it does |
|---|---|
ipconfig | Shows the addresses of the server. |
Test-NetConnection example.org -Port 443 | Tests whether the server reaches another computer on a port. TcpTestSucceeded: True means yes. |
Resolve-DnsName example.org | Looks up the address of a name. |
Get-NetTCPConnection -State Listen | Lists the ports on which programs wait for connections. |
More: See Which Programs Listen on Your Windows Server and Which Ports Are Open, Open a Port for Your Application on Windows Server, Windows Server Does Not Answer Ping? Allow Ping in the Firewall, Allow Remote Desktop Only From Your IP Addresses, Add an Additional IP Address on Windows Server.
Users and Logins
| Command | What it does |
|---|---|
whoami | Shows the user you are logged in as. |
quser | Shows who is logged in right now. |
Get-LocalUser | Lists the users of the server. |
More: Who Logged In to Your Windows Server? Check Remote Desktop Logins and Failed Attempts, Add a User Who Can Connect With Remote Desktop, How to Change the Administrator Password on Windows Server.
The System
| Command | What it does |
|---|---|
Get-ComputerInfo -Property OsName, OsVersion | Shows the version of Windows. |
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5 | Lists the last installed updates. |
Get-TimeZone | Shows the time zone of the server. |
Restart-Computer | Restarts the server. |
More: Windows Update on Windows Server, Set the Time Zone on Windows Server and Check That the Clock Is Right, How to Restart Windows Server, Windows Server Restarted? Find Out When and Why, Find Errors in the Logs of Your Windows Server: Event Viewer and PowerShell, Run a Program or Script on a Schedule on Windows Server: Task Scheduler, Microsoft Defender on Windows Server: Check the Protection, Run a Scan and Exclude a Folder, Back Up Windows Server With Windows Server Backup.
Help
Get-Help Get-Volume -Examplesshows examples for a command.Get-Command *firewall*lists all commands with a word in their name.- Add
-WhatIfto a command that changes something, and PowerShell only says what it would do. clsclears the window,exitcloses it.
Good to Know
- Capital and lowercase letters do not matter in commands, file names and folder names.
- Put paths with spaces between quotes:
Set-Location "C:\Program Files". - New here? Start with Windows Server: Quick Start Guide.
