Solved

Exporting GPO as HTML

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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…
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…

932 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

14 Experts available now in Live!

Get 1:1 Help Now