microsoft / StigRepo

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

Start-DscBuild with -Computername generates DSCConfig for target machine but generates MOFs for all systems #40

Open JakeDean3631 opened 3 years ago

JakeDean3631 commented 3 years ago

Bug/Issue Description Running Start-DscBuild -Computername generates MOFs for all systems instead of being limited to the provided ComputerName parameter value

Reproduction Steps Steps to reproduce the behavior:

  1. Run Start-DscBuild -ComputerName $CompName
  2. See that a DSC Config is built only for the target system, but MOFs are generated for all systems

Expected Behavior DscConfigs and MOFs are generated only for the target computername provided.

Recommended fix action Modify New-SystemData to limit the MOF creation to the computername provided

Existing Workarounds N/A

Screenshots

image

Additional context Add any other context about the problem here.

TurnerMarshall commented 2 years ago

RepoFunctions.PS1 782 dscNodeConfigs Creates an array system names 814 A foreach is run on DscNodeConfigs to nodeconfig this is where the MOF is generated there is nothing to limit it to just that computer name