gpo-report

Welcome Forums General PowerShell Q&A gpo-report

Viewing 2 reply threads
  • Author
    Posts
    • #245628
      Participant
      Topics: 1
      Replies: 1
      Points: -6
      Rank: Member

      Hello!

      I try to extract an html-report for every GPO I have in my domain separately but I do not succeed. Here is my command

      get-gpo -all | select displayname | % {Get-GPOReport -Name $_.displayname -ReportType Html -path “c:\temp\($Displayname).html”}

      Where is my fault?

      Thank you

    • #245637
      Participant
      Topics: 8
      Replies: 568
      Points: 2,171
      Helping Hand
      Rank: Community Hero

      You correctly referenced $_.displayname for -Name but later incorrectly use $displayname. Also, sometimes displayname can have characters present that are not allowed in a filename. You may want to reconsider and use ID instead. You also don’t need the select displayname, it isn’t adding anything.

      or

    • #245871
      Participant
      Topics: 1
      Replies: 1
      Points: -6
      Rank: Member

      Thank you very much, works fine now

Viewing 2 reply threads
  • You must be logged in to reply to this topic.