Solved

Exporting GPO as HTML

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

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 84

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

733 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