Solved

Exporting GPO as HTML

Posted on 2011-03-17
3
1,060 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 83

Accepted Solution

by:
oBdA earned 500 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 83

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
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 steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

816 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

11 Experts available now in Live!

Get 1:1 Help Now