GPO Reports of Active Directory via Power Shell to HTML in Windows Server 2012

Open Power Shell as Administrator
 

image



      Then write the following PS Script.
 
You have two ways to make this happend.
  • Option One
Get-GPOReport –ALL
image
Get-GPOReport –Name “Default Domain Controllers Policy” –ReportType HMTL –Path C:\GPOReports\DDCP.html
image
Make sure that you have choose the correct name of the GPO, and you have the directory created.
How to create an directory from PS?
Here’s the command
New-Item C:\GPOReports –ItemType Directory
image
 
 
 
  • Option Two
 
$gpos = Get-GPO –ALL
Foreach($gpo in $gpos)
{
$File = “C:\GPOReports” + gpos.displayname + “.html”
Get-GPOReport –Name $gpo.displayname –ReportType HTML –Path $File }
 
image

Hope this helps
Any question just send me an email or contact me via twitter @davidiacevedo
Thanks for viewing

Comments

  1. Nice a simple, have you try exporting this to a .csv?

    ReplyDelete
  2. yes send me an message and i let you know how

    thanks for watching

    ReplyDelete

Post a Comment

Popular posts from this blog

How to create a NIC Teaming on Windows Server 2012 UPDATED !

Update Rollup 3 for System Center 2012 R2 Service Manager