[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Exporting GPO as HTML

Posted on 2011-03-17
3
Medium Priority
?
1,087 Views
Last Modified: 2012-05-11
Hi,

We are using Windows Server 2003 R2 Domain Controllers. We have one OU Called Workstations and there are 10 Group Policy Objects are applied to this OU like GPO 1, GPO 2...GPO 10. I want to export all the ten group policies and wish to save them as HTML file for each Group Policy. Can anyone please provide me any script how to do this?

I know there is a script in C:\Programfiles\GPMC\Scripts\GetReportsForAllGPOs.wsf but this query will give all the GPOs in the entire domain as HTML one by one. But I want only for a particular given OU.

Please provide me the needed query for this.
Thanks in Advance.
0
Comment
Question by:gaddam01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 35155824
With the default scripts, you can only create reports "per GPO", not "per OU".
You can use "GetReportsForGPO.wsf" to create a report for a single GPO:
cscript "GetReportsForGPO.wsf" "GPO 1" "B:\ackup\Folder"
If you need to do this on a regular basis, you can create a wrapper batch script for it:
@echo off
setlocal
set GPOList="GPO 1" "GPO 2" "GPO 10"
set ReportFolder=C:\GPOReports
set ScriptFolder=%ProgramFiles%\GPMC\Scripts
if not exist "%ReportFolder%" md "%ReportFolder%"
for %%a in (%GPOList%) do (
  echo Processing %%~a ...
  cscript.exe "%ScriptFolder%\GetReportsForGPO.wsf" "%%~a" "%ReportFolder%"
)

Open in new window

0
 

Author Comment

by:gaddam01
ID: 35157631
Hi,
Thanks for the reply. Can I directly run the script given by you or any modifications are required??

0
 
LVL 85

Expert Comment

by:oBdA
ID: 35157755
You just save it as Whatever.cmd, and you need to modify at least the variables "GPOList" to contain the GPO names you want to retrieve, and "ReportFolder" to contain the path where the generated reports should be stored.
The GPMC needs to be installed on the machine where you run the script, and if it's a default installaiton, the "Scriptfolder" should already be set correctly.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question