# The whole primary display, as a PNG. For CI's real-window check on Windows. param([string]$Path) Add-Type -AssemblyName System.Windows.Forms, System.Drawing $bounds = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds $image = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height $graphics = [System.Drawing.Graphics]::FromImage($image) $graphics.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size) $image.Save((Join-Path (Get-Location) $Path), [System.Drawing.Imaging.ImageFormat]::Png)