Group policy export to CSV

  • 2K Views
  • Last Post 30 May 2016
yogeshcittu posted this 28 May 2016

Hi All, Please help me with PowerShell script to export all the group policy in a domain that is applied to both users and computers and should be able to export to a CSV file. Regards,
Yogesh

Order By: Standard | Newest | Votes
ellis.chris posted this 30 May 2016

http://www.denver.org/restaurants/denver-dining/must-try-restaurants/
-------- Original message --------

show

darren posted this 29 May 2016

Since we sell products that do exactly this (export GP settings for analysis) we have conversations with customers about this all the time and I can share a few reasons why you would (and wouldn't) want to just dump a bunch of settings:

 



·        

GP Cleanup/Optimization: It can be useful to be able to analyze GP settings in the whole in an effort to reduce/consolidate/optimize your GP deployment. But by and large, just dumping every setting from every GPO, linked

or unlinked, without context, is rarely useful



·        

Search: It’s nice to be able to search for a setting within the environment (e.g. where did I implement that IE policy?) This is one scenario where having a searchable “database” of all settings can be useful, regardless

of context



·        

Compliance/Comparison: You might want to know what settings exist for a given context, and be able to compare those to know that they are consistent across contexts (e.g. are the users in the Marketing OU getting the  same

settings as the users in the Sales OU?). Again, because GP is dynamically filtered, you have to understand/acknowledge that just looking at GPO settings in a vacuum can be somewhat limited—useful up to a point, if you will.

 

So Yogesh, depending upon your goal, that might drive us to give you a particular recommendation.



 

Darren

 

show

g4ugm posted this 29 May 2016

That’s not what he asked. That’s users to CSV and does not include the applied group policy...
.. This is fine for users as they are a simple object and attributes. A user has about 200 attributes...

Group Policy has a hierarchy and so is much harder to convert to a CSV which is a flat structure. There are over 3,500 settings in the Windows/10 standard policy.
In addition, Group Policy is easily extended. Many products come with additional settings files....
... lastly group policy may also include scripts, arbitrary permissions on files, folders and registry keys. How do put the content of a script into a CSV file...

Dave

show

kurtbuff posted this 29 May 2016

My bad - wrong script.

This is a start on what you want, perhaps.
http://exchangetips.us/2013/04/get-a-list-of-your-group-policy-objects-using-powershell/

show

kurtbuff posted this 29 May 2016

https://gallery.technet.microsoft.com/Powershell-script-to-5edcdaea

show

g4ugm posted this 29 May 2016

Why? i.e. do you want it as a back-up? To analyse the settings? To check application. You can back them up with powershell, BUT as they may contain SID’s this may not be usefull… 

show

yogeshcittu posted this 29 May 2016

Dave,

I have tried to export to .html and.xml but out of curiosity wanted to know whether we can export to csv file.

show

g4ugm posted this 28 May 2016

Its probably not useful. What are your deliverables and  motives 

show

Close