These 30 PowerShell commands cover discovery, files, processes, services, system checks, data, and sessions. Each entry includes a starter example; commands that can remove files, stop processes, or change services are clearly marked. Examples target common PowerShell use on Windows, and some commands or options vary by operating system and PowerShell version.
PowerShell commands pass objects through a pipeline, rather than merely passing formatted text. Microsoft’s language specification defines a pipeline as commands separated by the pipe operator (|). To find what is available in your session, use Get-Command; to learn its syntax and options, use Get-Help.
Help and command discovery
1. Get-Command
Find commands available in the current session, including cmdlets, functions, scripts, aliases, and applications.
Get-Command *Process*
Use a wildcard to search names. Availability depends on installed modules and the current environment.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
2. Get-Help
Read a command’s description, syntax, parameter details, and examples.
Get-Help Get-Process -Examples
-Examples displays examples when help content is available. For syntax notation, see Microsoft’s about_Command_Syntax.
3. Update-Help
Download or update help files for modules that support updateable help.
Update-Help
This may require an elevated session or internet access, depending on the module and environment. It does not install PowerShell modules.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFiles and folders
4. Get-Location
Show the current working location.
Get-Location
5. Set-Location
Change the current working folder.
Set-Location -Path 'C:UsersPublic'
The -Path parameter accepts the destination path. Use a path that exists.
6. Get-ChildItem
List items in a folder; it can also list registry keys and other provider locations.
Get-ChildItem -Path 'C:Temp'
Use -Recurse to include subfolders, but expect a larger result on broad paths.
7. New-Item
Create a file or directory.
New-Item -Path 'C:Tempnotes.txt' -ItemType File
Set -ItemType Directory to create a folder instead. Check the path before creating items.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
8. Copy-Item
Copy files or folders.
Copy-Item -Path 'C:Tempnotes.txt' -Destination 'C:Tempnotes-copy.txt'
For folder trees, -Recurse includes child items.
9. Move-Item
Move an item to another location, or rename it by changing the destination name.
Move-Item -Path 'C:Tempnotes-copy.txt' -Destination 'C:Temparchivenotes.txt'
Confirm that the destination is correct before running; moving changes the item’s location.
10. Remove-Item
Destructive: delete files or folders.
Remove-Item -Path 'C:Tempold-notes.txt'
Verify the exact path before execution. Recursive deletion can remove many items; do not add -Recurse unless that is intended.
11. Get-Content
Read a text file.
Get-Content -Path 'C:Tempnotes.txt'
Use -Tail 20 to read only the last 20 lines, where supported by the target version.
12. Set-Content
Write content to a file, replacing its existing content.
Set-Content -Path 'C:Tempstatus.txt' -Value 'Ready'
Warning: this overwrites the file’s contents. Check the destination before running.
13. Add-Content
Append content to a file without replacing its existing text.
Add-Content -Path 'C:Tempstatus.txt' -Value 'Checked'
Processes and services
14. Get-Process
Inspect processes running on the local computer.
Get-Process
Use -Name to narrow the result, for example Get-Process -Name notepad.
Recommended Free Tools
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
15. Stop-Process
State-changing: stop a process by name or ID.
Stop-Process -Name notepad -WhatIf
-WhatIf previews the action where supported. Remove it only after checking that the target process is the one you intend to stop; permissions may be required.
16. Get-Service
View service status on Windows.
Get-Service
Filter by name with -Name, such as Get-Service -Name Spooler. Service availability and permissions vary.
17. Start-Service
State-changing: start a Windows service.
Start-Service -Name Spooler
Starting a service may require an elevated session and can affect system behavior.
18. Stop-Service
State-changing: stop a Windows service.
Stop-Service -Name Spooler -WhatIf
Preview the action first; stopping a service can interrupt dependent software or Windows functions. Administrative permissions may be required.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
System and network checks
19. Get-Date
Display the current date and time.
Get-Date
Use -Format to request a formatted string, for example Get-Date -Format 'yyyy-MM-dd'.
20. Get-ComputerInfo
On Windows, retrieve operating-system and computer details.
Get-ComputerInfo
The output can be extensive. Select specific properties to narrow it; available properties depend on the operating system and PowerShell version.
21. Test-Connection
Test network reachability using ICMP echo requests.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Test-Connection -ComputerName example.com -Count 2
A failed response does not by itself prove a host is offline: firewalls or network policies may block ICMP.
22. Resolve-DnsName
Query DNS records for a name on Windows environments where this command is available.
Resolve-DnsName -Name example.com
Command availability can differ by operating system and installed components. If it is missing, use Get-Command Resolve-DnsName to check the current session.
Filtering, shaping, and saving data
23. Where-Object
Filter objects by a property value. Microsoft documents this command in its Where-Object reference.
Get-Process | Where-Object { $_.CPU -gt 10 }
Here, $_ refers to the current pipeline object. This example keeps processes whose reported CPU value exceeds 10; it is a filter, not a measurement of current CPU percentage.
24. Select-Object
Choose properties to display or select a subset of objects. See Microsoft’s Select-Object reference.
Get-Process | Select-Object -Property ProcessName, Id, CPU
Use -First 5 to select the first five objects in the pipeline.
25. Sort-Object
Sort objects by one or more properties.
Get-Process | Sort-Object -Property CPU -Descending
Sorting large result sets can take time; sort by a property that is meaningful for your task.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
26. Measure-Object
Calculate simple statistics for pipeline input, such as a count or numeric sum.
Get-ChildItem -File | Measure-Object
For numeric properties, specify one with -Property; supported measures include -Sum and -Average.
27. ForEach-Object
Run an operation once for each object received through the pipeline.
Get-ChildItem -File | ForEach-Object { $_.Name }
This example emits each file’s name. The script block operates on one pipeline object at a time.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →28. Get-Member
Inspect the properties and methods exposed by objects in a pipeline.
Get-Process | Get-Member
Use it when you need to discover which properties can be filtered or selected, rather than guessing from formatted output.
29. Export-Csv
Save objects as a comma-separated values file for use in spreadsheets or other tools.
Get-Process | Select-Object ProcessName, Id, CPU | Export-Csv -Path '.processes.csv' -NoTypeInformation
The path is relative to the current location in this example. Check the output path before writing, especially if a file already exists.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches30. ConvertTo-Json
Convert objects to JSON text.
Get-Process | Select-Object ProcessName, Id | ConvertTo-Json
Use -Depth when nested objects need deeper serialization; the appropriate value depends on the data structure and version.
Put the commands together
A practical learning loop is to discover a command, inspect its examples, run it, and then filter or shape its objects. This combines the distinct roles of command discovery and help with PowerShell’s object pipeline:
Get-Command *Process*
Get-Help Get-Process -Examples
Get-Process | Where-Object { $_.CPU -gt 10 } | Select-Object -Property ProcessName, Id, CPU
The last line filters process objects and selects three properties for display. To check syntax, parameters, and behavior for your own release, consult that command’s help and the relevant Microsoft Learn reference; Windows PowerShell 5.1 and newer PowerShell releases do not necessarily have identical command availability or behavior.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

