How do I run the GPO differential report using from a Command Line Interface? (NETIQKB38664)

  • 7738664
  • 02-Feb-2007
  • 08-Sep-2008

Resolution

goal
How do I run the GPO differential report using from a Command Line Interface?

fact
NetIQ Group Policy Administrator 5.0

fact
Group Policy Administrator 3.0

fact
Group Policy Administrator 4.0

fact
Group Policy Administrator 4.5

fix

The GPO differential report can be run using scripting interface.  The script can then be scheduled to run on a regular interval using native Windows Task Scheduler.  Please refer to the following example for syntax usage and sample code on how to Compare and Differentiate AD Version Report using the scripting interface:  

Compare and Differentiate AD Version Report

Generate a comparison HTML report with GPO from Active Directory. The DiffParameter indicates the type of comparison report. A True value includes only the differences in the report. A False value includes both the similarities and differences in the report.

Syntax

GPOObject1.CompareADReportHTML VersionNumber, HTMLfile, DiffParameter

Sample Code

Generate a compare with AD version report for all GPOs in a category.

Dim oGPRroot, oCategory, oGPO, sConnect, sCategory, sPath

Dim i, sCurrentFile

sCategory = "FAGPR://CN=UserOU,CN=RELEASE,DC=Repository,DC=Net"

sPath = "C:\Diffreport_User\"

Set oGPRroot = WScript.CreateObject("faGPRRoot.faGPRRoot")

oGPRroot.ConnectTo("PROVIDER = SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=GPO_REPOSITORY;Data Source=RPSQL01;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=SECONDDOMAIN;Use Encryption for Data=False;Tag with column collation when possible=False")

Set oCategory = oGPRroot.GetObject(sCategory)

oCategory.EnumType = "GPO"

i = 1

For Each oGPO in oCategory

sCurrentFile = sPath + oGPO.Name + cstr(i) + ".htm"

oGPO.CompareADReportHtml 0, sCurrentFile, FALSE

i = i + 1

Next

wscript.echo "Operation Completed"



note
For Group Policy Administrator 5.0,  This information is also available in the GPA User Manual on page 244.

note
 This information is also available in the GPA User Manual on page 173.

Additional Information

Formerly known as NETIQKB38664