Practice PowerShell in a disposable folder as a standard user. The objective is not memorizing aliases. It is learning to inspect location, predict effects, run one operation, and verify the result.
Create PowerShell-Practice in your Documents folder and add two non-sensitive
text files. Confirm the path before every change.
1. Navigate
Get-Location
Set-Location -Path "$HOME\Documents\PowerShell-Practice"
Verify with Get-Location. A relative path depends on the current location.
2. List
Get-ChildItem
Get-ChildItem -File
Inspect names and item types before copying or moving anything.
3. Read text
Get-Content -Path ".\notes.txt"
Use only a file you created. Text-reading commands can expose private content in terminal history, logs, or screen sharing.
4. Create
New-Item -Path ".\drafts" -ItemType Directory
New-Item -Path ".\drafts\plan.txt" -ItemType File
List both paths to verify. Stop if an item already exists rather than adding a force option blindly.
5. Copy
Copy-Item -Path ".\notes.txt" -Destination ".\drafts\notes-copy.txt"
Read source and destination after copying. Copying does not remove the source.
6. Move
Move-Item -Path ".\drafts\plan.txt" -Destination ".\plan.txt"
Verify that the destination exists and the old path does not. Moving across volumes or replacing existing items can have different consequences; keep the exercise inside one folder.
7. Search content
Select-String -Path ".\*.txt" -Pattern "verification"
Use a known word. Search output identifies file, line, and match context.
8. Inspect processes
Get-Process
Get-Process | Select-Object -First 5
Inspection is enough. Do not stop processes during this exercise. Ending a system, security, assessment, or institution-managed process can lose work or violate policy.
9. Use a pipeline
PowerShell passes objects through pipelines, not only displayed text:
Get-ChildItem -File |
Sort-Object -Property Length |
Select-Object Name, Length
Properties remain available for selection and sorting. Formatting changes the display; it does not necessarily change underlying files.
10. Ask for help
Get-Help Copy-Item
Get-Help Copy-Item -Examples
Get-Command -Noun Item
Microsoft’s
Get-Help documentation
describes local and online help. Installed help and available commands vary by
PowerShell edition, version, modules, permissions, and policy.
Verify and clean up deliberately
Review:
Get-ChildItem -Recurse
Do not practice recursive deletion. Keep the folder as evidence or remove its contents later through File Explorer after confirming the exact target and that nothing valuable was placed there.
Common mistakes
- Practicing in a real course or system directory.
- Using aliases before learning full command names.
- Adding
-Forceto silence a warning. - Forgetting that the pipeline carries objects.
- Stopping processes casually.
- Copying commands that contain another person’s paths.
Do this now
Complete all ten operations. Before each one, write a prediction. Afterward, record the observed path or output that confirmed the result.
Log what you learned
Record only:
- Result: What did the action produce?
- Evidence: What observation, test, or source supports that result?
- Next action or unresolved question: What should happen next?
Next, decide whether a project belongs in native Windows or WSL.