{"id":668,"date":"2012-04-15T16:13:14","date_gmt":"2012-04-15T16:13:14","guid":{"rendered":"https:\/\/pipe2text.com\/?page_id=668"},"modified":"2012-04-15T16:41:54","modified_gmt":"2012-04-15T16:41:54","slug":"generating-html-reports-for-group-policy-objects-using-powershell-2-0","status":"publish","type":"page","link":"https:\/\/pipe2text.com\/?page_id=668","title":{"rendered":"Generating HTML Reports for Group Policy Objects using PowerShell 2.0"},"content":{"rendered":"<p>Hi All,<\/p>\n<p>There\u00a0may be times that you want to generate an HTML report of your Group Policy Objects such as to review them, document them or show them to others. In order to gain access to the Group Policy\u00a0Module containing the necessary cmdlets,\u00a0you can install\u00a0GPMC through the &#8220;Add Features Wizard&#8221; on a Windows 2008\u00a0R2 server. If you would like to gain access to the Group Policy Module from a Windows 7 machine, you can download and install the proper RSAT tools for Windows 7 and enable &#8220;Group Policy Management&#8221; under &#8220;Remote Server Administration Tools&#8221; in &#8220;Turn Windows Features on and off&#8221;.<\/p>\n<p>To get started you will need to import the module by opening PowerShell and typing the following command:<\/p>\n<p>Import-Module GroupPolicy<\/p>\n<p>To Get\u00a0a list of all GPOs in the Domain you can type the following:<\/p>\n<p>Get-GPO -All<\/p>\n<p>When I run this command\u00a0I like to make the output easier to read by only selecting the display name of\u00a0each\u00a0GPO and sorting them\u00a0in alphabetical order. To do that you can type the following:<\/p>\n<p>Get-GPO -All | sort DisplayName | select Displayname<\/p>\n<p>Now that I have obtained a list of GPOs Im going to choose one from the list\u00a0and\u00a0generate an HTML report for it. In the\u00a0command below\u00a0I am generating a report for a Group Policy named &#8220;Workstation Policy&#8221; and I\u00a0am saving\u00a0it to the root of the &#8220;c&#8221; drive.<\/p>\n<p>Get-GPOReport -Name &#8220;Workstation Policy&#8221; -ReportType HTML -Path c:\\WorkStationGPOReport.html<\/p>\n<p>OK. Now\u00a0lets say\u00a0now\u00a0you\u00a0need\u00a0to generate an HTML report for all GPOs\u00a0in\u00a0the\u00a0domain. To do so, you can type the following command:<\/p>\n<p>Get-GPOReport -All -ReportType HTML -Path c:\\GPOAll.html<\/p>\n<p>To learn more about generating GPO reports using the Get-GPOReport cmdlet you can use the help file by simply typing Get-Help Get-GPOReport. I hope this helps. If you have any questions or feedback please leave a comment.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi All, There\u00a0may be times that you want to generate an HTML report of your Group Policy Objects such as to review them, document them or show them to others. In order to gain access to the Group Policy\u00a0Module containing &hellip; <a href=\"https:\/\/pipe2text.com\/?page_id=668\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"class_list":["post-668","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=668"}],"version-history":[{"count":10,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/668\/revisions"}],"predecessor-version":[{"id":677,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/668\/revisions\/677"}],"wp:attachment":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}