Project

DesktopManager

DesktopManager is a C# library and PowerShell module that allows to get and set wallpapers to given monitor.

Stars51
Forks6
Open issues0
PowerShell Gallery downloads526029
ReleaseDesktopManager-v3.6.1
Language: C# Updated: 2026-04-10T11:43:34.0000000+00:00

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