Exporting GPO's to Excel

Christian_ 1 Reputation point
2020-08-04T19:47:38.88+00:00

Basically asking if there's a step-by-step on how to export multiple GPO's from AD onto Excel. Preferably without the usage of a 3rd party software.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,773 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2020-08-04T21:27:19.073+00:00

    You could use PowerShell to dump them to XML, then open via excel.
    https://learn.microsoft.com/en-us/powershell/module/grouppolicy/get-gporeport?view=win10-ps

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  2. Vicky Wang 2,646 Reputation points
    2020-08-05T09:05:12.107+00:00

    Until now, there have been a few ways to get data into Excel. One way is to create a comma-separated value file (.csv) by using Export-Csv, and then open it in Excel, for example:

    Get-Process | Export-Csv –NoType c:\Temp\ps.csv

    Invoke-Item c:\Temp\ps.csv

    Another way to get data into Excel is to remotely control Excel. Use the Excel COM interface to spin it up, create a workbook or a worksheet, and then loop through your data to push it into the appropriate cells. You need to create headers and add the data to the correct row and column.

    Here’s a snippet that creates Excel, makes it visible, and then adds a workbook:

    $xl = New-Object -ComObject Excel.Application

    $xl.Visible = $true

    $xl.Workbooks.Add()

    An alternative is to use .NET and Open Database Connectivity (ODBC). It takes some set up, and you need to write the looping and poking in the same way as the COM interface example. This approach is like working with SQL Server data.

    reference:https://devblogs.microsoft.com/scripting/introducing-the-powershell-excel-module-2/


  3. Vicky Wang 2,646 Reputation points
    2020-08-07T09:23:59.713+00:00

    Hi,
     
    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.
     
    Best Regards,
    Vicky

    0 comments No comments

  4. Vicky Wang 2,646 Reputation points
    2020-08-12T06:15:52.513+00:00

    Hi,
     
    Just want to confirm the current situations.
     
    Please feel free to let us know if you need further assistance.
     
    Best Regards,
    Vicky 

    0 comments No comments