Get a GPO report for each policy | output separate for each OBject.HTML

Hi guys, Im stuck in creating a gpo report-all ;
I want to separate all generated policy report in a folder .

jsamson,
Welcome to the forums.

Where exactly did you get stuck? Please share your code. (formatted as code please :wink: )

Hi Olaf, Im stuck with this
$g = get-gpo -all
Get-GPOReport -name $g.displayname -ReportType html

I want to create a html file for all of my policies separately then store it in a folder.

Hi Olaf, Im stuck with this
$g = get-gpo -all
Get-GPOReport -name $g.displayname -ReportType html

I want to create a html file for all of my policies separately then store it in a folder.

… why twice? :wink:

Could you please format your code as code here in the forum? Thanks in advance.

Don’t you get error messages when you run this code? If you get error messages you should post them here as well. Post them completely and formatted as code as well, please.

When you carefully read the help for …

… you will see that the paramters “-Name” and “-GUID” only take single values. Your variable “$g” on the other hand is an array. That’s why you need to use a loop to provide one single element at a time for Get-GPOReport.

So you may read the help for

and

as well to learn how to use loops. Please always read the help completely including the examples.

You may also read the help for

to be able to export your reports into files.

1 Like

Thank you olaf, will read it… yes there’s an error on it… but what i want to say is what I want to do… anyway, I’ll read the documents you’ve sent… thank you