Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows 11 does not have one universal, built-in screenshot command. The right command depends on what you need to capture: a Windows Sandbox guest, a GDK development session, or your normal desktop through custom PowerShell/.NET code. You can also launch Snipping Tool’s interactive interface with its URI protocol, but that is an app-integration mechanism rather than a general unattended CLI saver.

Choose the command-line screenshot method that fits

Need Documented route Important limitation
Capture a Windows Sandbox guest desktop winapp target screenshot Works for the Sandbox guest and writes the image on the host.
Capture in a Microsoft GDK workflow wdcapture screenshot Specialized GDK tooling; it is not guaranteed to be installed on every Windows 11 PC.
Automate the ordinary Windows desktop Custom PowerShell using .NET Graphics.CopyFromScreen The API is documented, but Microsoft does not provide a universal ready-made PowerShell command.
Let a user select an area interactively ms-screenclip://capture/image Requires Snipping Tool and has packaging and callback restrictions for application integration.

If you only need a quick manual snip, press Win+Shift+S and use Snipping Tool. The command-line approaches below are for repeatable, integrated, or unattended workflows.

Capture a Windows Sandbox desktop with winapp target screenshot

Microsoft documents this command for taking a screenshot of the Windows Sandbox guest and saving it to the host. Run it from a terminal on the host while the Sandbox session is available:

winapp target screenshot sandbox -o .sandbox.png

The -o option chooses the host output path. If you omit it, Microsoft’s documented default filename is screenshot.png in the current location:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
  • Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections
  • Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
  • Storage: Combines 500GB SSD and 1TB HDD for ample storage space
  • Graphics: Integrated Intel UHD Graphics 630 for crisp visuals and video playback
  • Design: Sleek desktop tower with black color and slim profile for modern look
winapp target screenshot sandbox

What the Sandbox capture contains

  • The guest desktop is captured, not the host’s Sandbox window chrome.
  • The output is unscaled.
  • The command waits for the guest UI turn without activating a window.
  • The title bar and borders of the host window are excluded.

This is useful for automated Sandbox tests and demonstrations. It is not a command for capturing your normal Windows desktop, and it will fail or be irrelevant when no supported Sandbox target exists. See Microsoft’s Windows Sandbox execution documentation for the command’s current prerequisites and behavior.

Use wdcapture screenshot in a GDK workflow

wdcapture.exe is Microsoft’s Game Development Kit (GDK) command-line capture utility. The documented command is:

wdcapture screenshot

It uses Windows Graphics Capture APIs. Microsoft documents SDR output as PNG and HDR output as JXR. The stated prerequisite is Windows 10 or later with Windows Graphics Capture support, but the executable belongs to GDK tooling; do not assume a stock Windows 11 installation includes it.

Use this route when your development environment already installs and configures GDK tools. For ordinary desktop automation, a custom PowerShell script is usually a better fit. The command and format details are in Microsoft’s Screen Capture (wdcapture.exe) documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a custom PowerShell screenshot command with .NET

.NET’s System.Drawing.Graphics.CopyFromScreen copies pixels from a specified screen rectangle into a drawing surface. It is an API, not a standalone executable, so the following is assembled PowerShell code. Test it on the PowerShell/.NET combination deployed on your machines.

Full primary-screen example

Add-Type -AssemblyName System.Drawing
Add-Type -AssemblyName System.Windows.Forms

$screen = [System.Windows.Forms.Screen]::PrimaryScreen
$bounds = $screen.Bounds
$bitmap = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)

try {
    $graphics.CopyFromScreen(
        $bounds.X,
        $bounds.Y,
        0,
        0,
        $bounds.Size,
        [System.Drawing.CopyPixelOperation]::SourceCopy
    )
    $bitmap.Save((Join-Path (Get-Location) 'screen.png'), [System.Drawing.Imaging.ImageFormat]::Png)
}
finally {
    $graphics.Dispose()
    $bitmap.Dispose()
}

The file is written as screen.png in the current directory. Change the final path and image format to suit your job. For JPEG, replace ImageFormat.Png with ImageFormat.Jpeg.

Capture a rectangle

Replace the screen bounds with explicit coordinates and dimensions. This example captures a 1,280×720 region beginning at desktop coordinate (100, 100):

$x = 100; $y = 100; $width = 1280; $height = 720
$bitmap = New-Object System.Drawing.Bitmap $width, $height
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)
try {
    $graphics.CopyFromScreen($x, $y, 0, 0,
        (New-Object System.Drawing.Size $width, $height),
        [System.Drawing.CopyPixelOperation]::SourceCopy)
    $bitmap.Save('region.png', [System.Drawing.Imaging.ImageFormat]::Png)
}
finally {
    $graphics.Dispose(); $bitmap.Dispose()
}

Coordinates are desktop coordinates, so a multi-monitor arrangement can include negative X or Y values. For a monitor-aware script, enumerate [System.Windows.Forms.Screen]::AllScreens and use each screen’s Bounds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Dell Optiplex 3060 Desktop Computer | Intel i5-8500 (3.2) | 32GB DDR4 RAM | 1TB SSD Solid State | Built in WiFi | Bluetooth | Windows 11 Professional | Home or Office PC (Renewed)
  • [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
  • [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
  • [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
  • [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
  • [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)

Runtime and failure considerations

  • The API can throw a Win32Exception when Windows cannot perform the copy.
  • Run in an interactive user session; a service or disconnected session may have no visible desktop to copy.
  • Dispose the Graphics and Bitmap objects, especially in loops, to avoid handle and memory leaks.
  • High-DPI scaling and mixed-DPI monitors can make logical coordinates differ from physical pixels. Validate the resulting dimensions on the target hardware.
  • Do not treat the Microsoft API reference as proof that a screenshot.exe command exists. It only documents the programmable method.

See the Graphics.CopyFromScreen API reference for overloads, coordinate arguments, and documented exceptions.

Launch Snipping Tool from a command or integrated app

Windows exposes Snipping Tool through the ms-screenclip: URI protocol. An image request has this general form:

start "" "ms-screenclip://capture/image/rectangle?redirect-uri=https%3A%2F%2Fexample.com%2Fcallback"

The exact URI must follow Microsoft’s protocol grammar. Image capture requires exactly one bare mode parameter: rectangle, freeform, or window. Supplying none or more than one is invalid. The protocol also supports parameters such as api-version, user-agent, enabledModes, and auto-save.

Why this is not a general unattended file command

  • The documented default protocol version is 1.2; the page lists supported versions 1.0, 1.1, and 1.2. An integrating client should query discovery and pin a supported version.
  • A capture request requires redirect-uri when an application expects a response.
  • Microsoft states: “This protocol requires a packaged Windows app (MSIX).” An unpackaged Win32 caller cannot receive the callback through redirect-uri.
  • A response may include a one-time file-access-token. Microsoft says it expires after 14 days and each app can have at most 1,000 active tokens.
  • auto-save is optional and still follows the user’s Snipping Tool settings.

Use the protocol when you are integrating capture into a packaged Windows application. For a script that must save pixels without user interaction, use Sandbox tooling, GDK where applicable, or custom screen-copy code instead. Consult Microsoft’s Launch Snipping Tool specification before constructing production URIs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Automate a website screenshot without managing a Windows desktop

If your target is a web page rather than the Windows desktop, a screenshot API avoids browser installation, display sessions, and DPI differences. ScreenshotNeo is the first option to try: it removes consent banners, newsletter popups, and chat widgets before capture, and only clean shots are billed.

Or skip the browser setup:

One GET request returns a PNG, JPEG, WebP, or PDF. The examples below use the documented API endpoint; see the ScreenshotNeo documentation for all parameters.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo supports full-page captures with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper sizes/margins/landscape/page ranges, HTML/CSS rendering, custom JavaScript and CSS, pre-capture clicks, hidden selectors, selector/delay/network-idle waits, request and resource blocking, headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs also work to ease migration.

Responses identify the result with X-Page-Verdict and X-Billed headers. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting checklist

“The command is not recognized”

Check the scope. winapp requires the Windows app-development tooling that provides it; wdcapture requires GDK. Neither is a universal Windows 11 executable. Install the relevant kit or choose the PowerShell method.

Rank #3
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
  • Model: Dell OptiPlex 7050 Small Form Factor (SFF)
  • Processor: Intel Core i7-7700 3.60 GHz
  • Memory: 32GB DDR4 Ram
  • Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
  • Operating System: Windows 11 Pro (64-bit)

The PowerShell script saves a black or wrong-sized image

Confirm that the process runs in an interactive session, inspect monitor bounds, and account for mixed-DPI layouts. Try the primary-screen example before adding multi-monitor logic.

CopyFromScreen throws a Win32Exception

Verify the rectangle is valid and that a visible desktop exists. Retry outside locked, disconnected, or service sessions and check that the destination file is writable.

Snipping Tool opens but no callback arrives

The protocol callback requires a packaged MSIX application identity. An unpackaged Win32 process cannot receive the response through redirect-uri; use auto-save/user interaction or a different capture method.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sandbox output is missing

Ensure the Sandbox target is running, use an absolute writable host path with -o, and remember that the command captures the guest—not the surrounding host window.

Which approach should you use?

  • Interactive human selection: Snipping Tool UI or its protocol integration.
  • Unattended Sandbox tests: winapp target screenshot sandbox.
  • GDK development capture: wdcapture screenshot.
  • General desktop scripting: custom PowerShell around Graphics.CopyFromScreen.
  • Web-page images or PDFs: ScreenshotNeo, especially when you need clean pages, repeatable rendering, or AI-agent access.

Frequently Asked Questions

Is there a built-in Windows 11 command named screenshot?

Microsoft’s documented options are scoped tools and APIs rather than one universal screenshot executable. Use Sandbox, GDK, custom PowerShell, or Snipping Tool integration according to the capture target.

Can I capture every monitor with the PowerShell example?

Yes. Enumerate [System.Windows.Forms.Screen]::AllScreens and copy each Bounds rectangle, or calculate a combined virtual-screen rectangle; validate mixed-DPI coordinates on the machines you support.

Does ScreenshotNeo capture my Windows desktop?

No. ScreenshotNeo captures web URLs, HTML/CSS, and PDFs through its API; it is not a replacement for a local Windows desktop capture utility.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.