Script that extracts Windows registry to a csv file(s)

Welcome Forums General PowerShell Q&A Script that extracts Windows registry to a csv file(s)

Viewing 4 reply threads
  • Author
    Posts
    • #183117
      Participant
      Topics: 1
      Replies: 1
      Points: 15
      Rank: Member

      Hello,

      I am looking for a way to extract all of the registry settings of two windows 10 machines into csv files so that I can compare two differences. Does anyone know how this could be done via powershell? I am kind of lost so any suggestions help, thank you!

    • #183147
      Senior Moderator
      Topics: 8
      Replies: 1140
      Points: 3,922
      Helping Hand
      Rank: Community Hero

      that'll be too much, you can export the registry hives in UI and compare it with Beyondcompare or any other comparison tool, that'll be easier.

    • #183177
      Participant
      Topics: 2
      Replies: 135
      Points: 708
      Helping Hand
      Rank: Major Contributor

      What @kvprasoon said is correct, but this could help you to some extent...

      
      $RegOnComp01 = Invoke-Command -ComputerName Comp01 -ScriptBlock {Get-ChildItem HKCU:\ -Recurse -ErrorAction SilentlyContinue}
      $RegOnComp02 = Invoke-Command -ComputerName Comp02 -ScriptBlock {Get-ChildItem HKCU:\ -Recurse -ErrorAction SilentlyContinue}
      Compare-Object -ReferenceObject $RegOnComp01 -DifferenceObject $RegOnComp02
      
      

      also with HKLM:\ as well.

      Thank you.

    • #184065
      Participant
      Topics: 1
      Replies: 1
      Points: 15
      Rank: Member

      Thanks for the answers.

      One more question! What if I wanted to do the exact same thing with Local Group Policies?

      Would there be an easy way to extract them into a CSV via powershell?

    • #184206
      Senior Moderator
      Topics: 8
      Replies: 1140
      Points: 3,922
      Helping Hand
      Rank: Community Hero

      AFAIK, PowerShell doesn't built in have capability to handle local group policies yet. You can use lgpo.exe, it can produce a text file with the relevant configs, then you can compare.

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