Link to home
Start Free TrialLog in
Avatar of litog
litogFlag for United States of America

asked on

PowerShell Group Policy Reports

Hello,

I'm attempting to get a good report in Excel for over 300 group policies.  I'd also like to get these in on one excel sheet so that I can sort, and view to find duplicate settings that I can combine. I'm finding this isn't as easy as I thought it was going to be. I tried exporting a report using get-gporeport but the export of the gporeport.xml doesn't open up good at all in excel, plus I don't want to open up each report manually and copy the contents over.

I also looked at SDM, but there is no budget for that so I have to look at scripts to do this.

I'm extremely new to scripting and still don't quite understand the scripting language but have tried the following to export some of the contents in the XML file.

Script so far
$xml = [xml](get-content 'C:\temp\gpo\gpreport.xml')
$xml.GPO | foreach {$_.Name + ":" + $_.CreatedTime + ":" + $_.User.Enabled + ":" + $_.User.ExtensionData.Name}

Results
IT EXPLORER:2008-05-13T18:44:40:true:Internet Explorer Maintenance Registry

Am I doing this correctly? What I want is to export the name, owner, created date, and the settings name, and settings for each of the policies, disabled or not, linked or not, etc...

Thanks
Lito
ASKER CERTIFIED SOLUTION
Avatar of Coralon
Coralon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial