External Project

DesktopManager

Windows desktop automation toolkit with a .NET library, 133 PowerShell cmdlets, CLI, MCP server, and tray app for displays, windows, wallpapers, audio, devices, and workstation profiles.

Stars107
Forks7
Open issues0
PowerShell Gallery downloads578647
Releasev4.8.0
Language: C# Updated: 2026-11-06

Curated Examples

Capture desktop screenshots

Use DesktopManager to capture desktop screenshots into a script-local output folder.

This pattern is useful for troubleshooting display state or collecting visual evidence during automation.

It is adapted from Examples/GetDesktopScreenshot.ps1.

Example

Import-Module DesktopManager

$outputPath = Join-Path $PSScriptRoot 'Output'
New-Item -ItemType Directory -Path $outputPath -Force | Out-Null

Invoke-DesktopScreenshot -Path (Join-Path $outputPath 'DesktopScreenshot.png')
Invoke-DesktopScreenshot -Path (Join-Path $outputPath 'PrimaryMonitor.png') -Index 0
Invoke-DesktopScreenshot -Path (Join-Path $outputPath 'Region.png') -Left 100 -Top 100 -Width 800 -Height 600

What this demonstrates

  • capturing full desktop output
  • targeting a specific monitor by index
  • capturing a defined screen region

Source