220-1102 Operating Systems Practice Question
A technician needs to add a network printer to a Windows 10 computer using the command line. Which command should be used?
⚠ Common exam trap
A common mix-up: candidates confuse `net use` (which maps network resources) with printer installation, or they assume PowerShell cmdlets like `Add-Printer` are the only command-line method, but the CompTIA 220-1102 exam specifically tests the legacy `rundll32` syntax as the correct command-line approach for adding a network printer in Windows 10.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
rundll32 printui.dll,PrintUIEntry /in /n\\server\printer
`rundll32 printui.dll,PrintUIEntry /in /n\\server\printer` is the proper command-line method to add a network printer in Windows 10. The `PrintUIEntry` function within `printui.dll` provides a comprehensive interface for printer management, and the `/in` switch specifically instructs it to install a printer connection using the UNC path provided after `/n`.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
net use \\server\printer
Why it's wrong here
`net use` is designed to map file shares to drive letters or mount UNC paths as persistent network drives; it operates at the file-sharing layer and does not invoke Windows print spooler services or install printer drivers. When pointed at a printer share named \\server\printer, modern Windows will either reject the resource as not a file share or, if the share is also exposed as a disk share, map it as a drive letter—never creating a printer queue.
- ✗
net print \\server\printer
Why it's wrong here
`net print` is a legacy Windows command from the LAN Manager and Windows 9x era that could display a print queue or control print jobs, but Microsoft discontinued it in modern Windows versions, and Windows 10's Command Prompt does not recognize it as a valid command. It cannot perform an unattended installation or add a printer object; attempting to run it produces a "'net print' is not recognized" error, so it is not a method for installing network printers.
- ✓
rundll32 printui.dll,PrintUIEntry /in /n\\server\printer
Why this is correct
The `rundll32 printui.dll,PrintUIEntry` approach is the native command-line interface into Windows' print UI DLL; the `/in` switch instructs it to install a printer and `/n\\server\printer` supplies the UNC printer name. When executed from the Run dialog or Command Prompt, printui.dll contacts the print server, retrieves the needed driver, creates a local printer queue, and connects the user to the shared printer. This is the standard scripted method for adding a network printer on Windows 10.
- ✗
add-printer -name "Printer" -driverName "Driver"
Why it's wrong here
`Add-Printer` is a PowerShell cmdlet, not a built-in command for the Command Prompt or Run dialog, so it would have to be invoked with `powershell -command` or from a PowerShell session. Even then, the example omits the connection-specific approach—the correct PowerShell syntax for a shared network printer is `Add-Printer -ConnectionName \\server\printer`—whereas `-Name` and `-DriverName` are for creating a locally managed printer using a specific driver and port, not for attaching to a remote print share.
Go deeper
Related to this question
Learn chapter
Linux Package Management: apt and yum
Key term
Windows 10
Windows 10 is a personal computer operating system developed by Microsoft that combines the familiarity of Windows 7 with the modern features of Windows 8, designed to run on a wide range of devices from desktops to tablets.
Key term
Windows
Windows is a family of operating systems developed by Microsoft that manages computer hardware and software, providing a graphical user interface for users to interact with their devices.
About these practice questions
One of 925 original 220-1102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 220-1102 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 220-1102 exam.