While we are trying to taking a screen shot on virtual machine facing below issue

System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)

at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation)

at UiPath.Vision.UiImage.FromScreenRegion(Rectangle region)
at UiPath.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)

2 posts were merged into an existing topic: Issue in take a screenshot on VM