PowerShell Introduction - Screen-reader friendly (JAWS/NVDA)
Estimated time: 20-30 minutes
Target audience: Users who are new to the command line and use screen readers.
Learning Goals
- Open and identify the PowerShell prompt
- Run basic commands:
pwd,ls -n,cd,ni,cat,echo - Redirect and page through long outputs for screen readers
- Use
Get-HelpandGet-Commandto learn more
Starting PowerShell
Windows
- Press Windows, type
PowerShell, then press Enter. - If you need elevated rights, press Windows+X then choose Windows PowerShell (Admin).
macOS / Linux
- Open Terminal.app (macOS) or your preferred terminal (Linux).
- Type
pwshand press Enter (PowerShell Core / pwsh must be installed).
When PowerShell starts you will hear the prompt and usually your current path. The default prompt often includes PS followed by the path, e.g., PS C:\Users\YourName>.
Essential commands - short list
pwd- print working directory (where you are now)ls -n- list file and folder names only (recommended for screen readers)cd <path>- change directoryni <filename>- create a file (alias for New-Item)cat <file>- show file contentsecho <text>- print text
Quick examples:
pwd
ls -n
cd Documents
ni notes.txt
echo "hello" > notes.txt
cat notes.txt
Paging long outputs for screen readers
- If an output is long, redirect to a file and open it in an editor:
some-command > output.txt ; notepad.exe output.txt. - Or pipe to
more:some-command | more(press Space to advance pages, Q to quit). - For very long listings prefer
ls -n | Out-File -FilePath list.txt -Encoding utf8then openlist.txt.
Help and discovery
Get-Help <command>shows help:Get-Help lsorGet-Help Get-ChildItem.Get-Command <name>locates a program or cmdlet:Get-Command openscad.
Tip: Redirect Get-Help into a file for easier reading: Get-Help Get-Command | Out-File help.txt ; notepad.exe help.txt.
Running scripts and executables
- Use the call operator
&to run files with spaces or when PowerShell might treat them differently:& "./script.ps1". - To run an executable by path:
& 'C:\Program Files\OpenSCAD\openscad.exe'.
Screen reader specific tips (JAWS, NVDA)
- Use
ls -nto avoid cluttered, multi-column listings. - Redirect large outputs to a text file and open it in an editor that your screen reader handles well.
- If output stops being announced, try moving focus with
Alt+Taband back, or briefly pressingCtrlorShiftto force announcement.
Suggested learning path
- Open PowerShell, run
pwd,ls -n,cdinto Documents. - Create a file with
ni test.txt, add a line withecho "hi" > test.txt, and read it withcat test.txt. - Use
Get-Help lsand redirect output to a file to read comfortably.
Hands-on: Explore the terminal (Beginner)
- Run
pwdand speak or note the output. - Run
ls -nin your home directory. If the list is long, save it:ls -n > listing.txt ; notepad.exe listing.txt. - Create a folder and file:
mkdir PS_Practice ; cd PS_Practice ; ni notes.txt. - Add a line:
echo "My first note" > notes.txt ; cat notes.txt.
Extension Exercises
- Use wildcards to list only
.scadfiles:ls -n *.scad. Proceed to search for other types of files. - Save a long command’s output and search it with
Select-String. - Create a small script that prints a timestamp and test it with
&. - Build a project template generator: write a script that creates a folder structure for a new 3D printing project.
- Create a personalized PowerShell profile with aliases for frequently used commands; test it after restart.
- Write a PowerShell script that combines multiple concepts: navigates folders, creates files, and performs file operations.
- Create a screen-reader navigation guide for PowerShell ISE; test with actual screen reader if available.
- Build a data analysis script: read a CSV file, filter and process data, and generate a report.
- Develop a troubleshooting aide: common PowerShell error messages, their causes, and solutions.
- Design a comprehensive PowerShell learning portfolio: document skills developed, commands mastered, scripts created, and practical applications.
Quick Quiz (10 questions)
- What command shows your current directory?
- How do you list names only for screen readers?
- How do you create an empty file?
- What operator runs a script or executable by path?
- How do you page through long output?
- True or False: PowerShell only runs on Windows.
- What does the
~symbol represent in a PowerShell path? - Explain why redirecting output to a file (e.g.,
command > output.txt) is helpful for screen reader users. - What is the difference between
Get-HelpandGet-Command? - Describe a practical scenario where you would use piping (
|) in PowerShell.
References
- Microsoft. (2024). PowerShell scripting language documentation. https://learn.microsoft.com/powershell/
- Microsoft. (2024). Out-File cmdlet reference. https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/out-file
- Wadhwa, K. & others. (2024). PowerShell for DevOps and system administration. https://learn.microsoft.com/powershell/scripting/learn/shell/navigate-the-filesystem