I'm running a standalone, non-domain Windows Server 2022 virtual machine. The commands `gpresult /r` and `rsop.msc` work normally, but `gpresult /h gpreport.html` fails with an "Invalid Pointer" error. I've tried running the command as Administrator and also tested absolute output paths, including a temporary folder and the user's desktop. Could permissions or a policy setting be causing this?
3 Answers
It may be worth checking for system or WMI corruption with tools such as `sfc /scannow`, `DISM /Online /Cleanup-Image /RestoreHealth`, or `winmgmt /verifyrepository`. However, since reporting and RSOP still work, the issue may be caused by a security policy rather than damaged system components.
Try specifying an absolute output path, such as `gpresult /h C:Tempgpreport.html`, and make sure the destination folder already exists and is writable. The default path may be causing a write-access problem.
I tested quoted absolute paths in both a temporary folder and the desktop, but the same error occurred.
The cause was a Global Object Access Auditing policy. Disabling auditing for both the file system and registry allowed `gpresult /h` to generate the HTML report normally. This policy worked on Server 2019 but caused the Invalid Pointer error on Server 2022.

I also reset and checked WMI, but that didn’t resolve it.