Hi, you could maybe try something like this to return the current screen resolution using WMI.
$CurrentRes = Get-WmiObject -Class Win32_VideoController -Property CurrentVerticalResolution,CurrentHorizontalResolution
$bounds = [Drawing.Rectangle]::FromLTRB(0, 0, $CurrentRes.CurrentHorizontalResolution, $CurrentRes.CurrentVerticalResolution)
It might need to be adjusted if you need to capture over multiple screens so it really depends on what your desired outcome is, on my system this works to grab my main display at 1440p without manually inputting the screen resolution. If taking the whole screen area you maybe able to use:
[System.Windows.Forms.Screen]::AllScreens
Taking the output to calculate the whole area covered by all screens and grab the whole area.