Windows Automation

Capture screenshots in PowerShell

Add screenshot and scrolling GIF capabilities to your PowerShell scripts with Invoke-WebRequest. Perfect for Windows automation, Azure, and DevOps.

Installation

  1. 1Invoke-WebRequest is built into PowerShell 5.1+ and PowerShell Core
  2. 2Get your API key from the dashboard
  3. 3Pass the X-KEY header using the -Headers parameter

Authentication

Include your API key in the X-KEY header with every request:

$headers = @{ "X-KEY" = "your-api-key" }
$response = Invoke-WebRequest -Uri $url -Headers $headers -OutFile "screenshot.png"

PowerShell Screenshot Example

Capture a screenshot or create a scrolling GIF animation with a simple GET request:

Screenshot
$headers = @{ "X-KEY" = "your-api-key" }

Invoke-WebRequest `
    -Uri "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png" `
    -Headers $headers `
    -OutFile "screenshot.png"
Animation
$headers = @{ "X-KEY" = "your-api-key" }

Invoke-WebRequest `
    -Uri "https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out" `
    -Headers $headers `
    -OutFile "animation.gif"

Response Format

On success, the API returns the image binary data directly in the response body.

Status Code200 OK
Content-Typeimage/png, image/jpeg, or image/gif
BodyBinary image data (saved with -OutFile)
Error ResponseError message with 4xx/5xx status

Key Features

Zero Setup

Invoke-WebRequest is built into PowerShell. No additional modules or browser installations required.

Production Ready

Built on Cloudflare Workers with global edge network. Perfect for scheduled tasks, Azure Automation, and DevOps pipelines.

PowerShell Integration

Pipeline-friendly cmdlets. Works with Azure PowerShell, Windows Task Scheduler, or any PowerShell environment.

Rich Features

Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.

Frequently Asked Questions

Do I need to install anything for PowerShell?

No. Invoke-WebRequest is built into PowerShell 5.1+ and PowerShell Core on all platforms.

Can I use this with Azure Automation?

Yes. Perfect for Azure Automation runbooks, GitHub Actions, Azure DevOps pipelines, or any PowerShell-based automation.

How do I handle errors in PowerShell?

Use try-catch blocks for error handling. Check $response.StatusCode for HTTP status codes.

What PowerShell version is required?

PowerShell 5.1+ or PowerShell Core 6+. The API is a simple HTTP GET request.

Ready to capture screenshots in PowerShell?

Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.

Start Free