Is it possible to get the output of gpresult in json file format?
Using the command line argument /h would be a bad idea because you would need to parse HTML files. Instead you could use /x. With enough efford it might be worth it to parse the XML output with PowerShell and convert it to JSON.
But as usual the actual question should be “why” you want to have the output in JSON?
That’s why I recommended to use the command line argument /x instead of /h. It outputs the result in XML which is somewhat easier to parse than HTML. ![]()
And please do not post images of code or plain text output. Instead post the plain text and format it as code.
Thanks
