Solved

Exporting GPO as HTML

Posted on 2011-03-17
3
1,056 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
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
oBdA earned 500 total points
Comment Utility
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
Comment Utility
Hi,
Thanks for the reply. Can I directly run the script given by you or any modifications are required??

0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now