this is my first time auditing and hardening a Windows 2008 server.

I thought that i could query the registry settings on the box using a command like reg query <registery name> . However i didnt realize that local policies i wish to query cannot be done in this way. For example i cant find a way to query the following settings on the system from the command line. My goal is to script some of these settings. I dont wish to use the GUI Local Security Policy Management Console

Computer Configuration\Policies\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies

Computer Configuration/Administrative Templates/Windows Components/Windows Update 

I have around 10 such policies i need to query. I DONT need to edit them. Can someone tell me how to do this query.


You can use Get-GPOReport powershel commandlet to export GPO to xml. And then parse it (for example with Select-XML) to check enabled policy settings.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.