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

KeyWhat it does
TabCompletes the name of a command, file or folder you started to type. Press it again for the next match.
Arrow upBrings back the previous command, so that you can run it again or correct it.
Ctrl+CStops the command that is running.
Right-clickPastes the text you copied into the window.

Files and Folders

CommandWhat it does
Get-LocationShows the folder you are in.
Get-ChildItemLists the files of the folder. dir and ls do the same.
Set-Location D:\DataGoes to a folder. cd does the same, cd .. goes one level up.
New-Item -ItemType Directory -Path D:\Data\PhotosCreates a folder, with the folders above it if they are missing.
Copy-Item notes.txt copy.txtCopies a file. For a folder: Copy-Item Data Data-copy -Recurse.
Move-Item old.txt new.txtRenames a file or folder, or moves it to another folder.
Remove-Item notes.txtDeletes 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 20Shows 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 *.logFinds 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

CommandWhat it does
Get-VolumeLists the drives with their size and free space.
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 5Shows the five programs that use the most memory.
Stop-Process -Id 1234Ends the program with this number (Id). What was not saved in it is lost.
Get-Service SpoolerShows whether a service runs.
Restart-Service SpoolerRestarts 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

CommandWhat it does
ipconfigShows the addresses of the server.
Test-NetConnection example.org -Port 443Tests whether the server reaches another computer on a port. TcpTestSucceeded: True means yes.
Resolve-DnsName example.orgLooks up the address of a name.
Get-NetTCPConnection -State ListenLists 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

CommandWhat it does
whoamiShows the user you are logged in as.
quserShows who is logged in right now.
Get-LocalUserLists 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

CommandWhat it does
Get-ComputerInfo -Property OsName, OsVersionShows the version of Windows.
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5Lists the last installed updates.
Get-TimeZoneShows the time zone of the server.
Restart-ComputerRestarts 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 -Examples shows examples for a command.
  • Get-Command *firewall* lists all commands with a word in their name.
  • Add -WhatIf to a command that changes something, and PowerShell only says what it would do.
  • cls clears the window, exit closes 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.
Was this answer helpful? 0 Users Found This Useful (0 Votes)