microsoft / StigRepo

Automated PowerSTIG Repository for Active Directory environments
35 stars 6 forks source link

New-SystemData function iterates through OUs twice and places System Data in the wrong location #34

Closed JakeDean3631 closed 3 years ago

JakeDean3631 commented 3 years ago

Bug/Issue Description New-SystemData generates system data twice for each Organizational Unit identified in ADDS, throws an empty searchbase error, and places some system data in the root of the systems folder.

Reproduction Steps Steps to reproduce the behavior:

  1. Initialize StigRepo
  2. Run New-SystemData in an ADDS environment
  3. Notice that each OU is targeted twice for systemdata generation

Expected Behavior Each OU should only be targeted once and system data files should be placed in the appropriate folders.

Recommended fix action Fix the New-SystemData function to only target each OU a single time and place system data files in the correct file location.

Existing Workarounds N/A

Screenshots image

image

Additional context Add any other context about the problem here.