Windows 11, Microsoft's latest operating system, comes with many built-in features, but some legacy tools like XPS Viewer aren't installed by default. XPS Viewer remains a useful application for opening, viewing, and printing XML Paper Specification (XPS) documents. Here's how to install it using PowerShell.

What Is XPS Viewer?

XPS Viewer is a Microsoft application designed to open, view, and print XPS files—a document format similar to PDF. While not as widely used today, XPS files are still encountered in enterprise environments, government documents, and legacy systems. Windows 11 does not include XPS Viewer by default, but it can be easily installed via PowerShell.

Why Use PowerShell for Installation?

PowerShell is a powerful scripting tool that allows users to automate tasks and manage system configurations efficiently. Installing XPS Viewer via PowerShell ensures a quick, scriptable, and error-free process compared to manual methods.

Prerequisites

Before proceeding, ensure:
- You have administrative privileges on your Windows 11 PC.
- PowerShell is available (it comes preinstalled with Windows 11).
- An active internet connection (required for downloading the component).

Step-by-Step Installation Guide

Step 1: Open PowerShell as Administrator

  1. Press Win + X and select Windows Terminal (Admin) or PowerShell (Admin).
  2. If prompted by User Account Control (UAC), click Yes.

Step 2: Install XPS Viewer Using PowerShell

Run the following command in PowerShell:

Add-WindowsCapability -Online -Name "XPS.Viewer~~~~0.0.1.0"

This command downloads and installs the XPS Viewer component from Microsoft’s servers.

Step 3: Verify the Installation

Once the installation completes, verify it by running:

Get-WindowsCapability -Online -Name "XPS.Viewer~~~~0.0.1.0" | Select-Object State

If the output shows State: Installed, the installation was successful.

Step 4: Launch XPS Viewer

You can now open XPS Viewer by:
- Searching for XPS Viewer in the Start Menu.
- Double-clicking an .xps or .oxps file.

Troubleshooting Common Issues

Issue: Installation Fails with an Error

If the command fails, try these fixes:
- Check internet connectivity – Ensure you have a stable connection.
- Run Windows Update – Some components require the latest updates.
- Use DISM as an alternative – Run:
powershell DISM /Online /Add-Capability /CapabilityName:XPS.Viewer~~~~0.0.1.0

Issue: XPS Viewer Doesn’t Appear After Installation

If XPS Viewer doesn’t show up:
- Restart your PC.
- Reinstall using the steps above.
- Check if it’s disabled in Windows Features (though PowerShell is the preferred method).

Alternative Methods to Install XPS Viewer

Using Optional Features in Settings

  1. Open Settings > Apps > Optional Features.
  2. Click Add a feature and search for XPS Viewer.
  3. Select it and click Install.

Using Windows Features Dialog (Legacy)

  1. Press Win + R, type optionalfeatures, and press Enter.
  2. Scroll down and check XPS Viewer.
  3. Click OK and restart if prompted.

Why Keep XPS Viewer?

Despite declining usage, XPS Viewer is still useful for:
- Opening legacy XPS/OXPS documents.
- Government or enterprise compliance requirements.
- Users who prefer a lightweight, built-in document viewer.

Conclusion

Installing XPS Viewer on Windows 11 via PowerShell is a quick and efficient method, especially for IT administrators managing multiple systems. By following this guide, you can ensure seamless access to XPS documents without relying on third-party software.

For more Windows 11 tips, stay tuned to windowsnews.ai!