microsoft / StigRepo

Automated PowerSTIG Repository for Active Directory environments
37 stars 7 forks source link

AzDscConfiguration names must begin with a letter or importing them to an automation account will fail #10

Closed JakeDean3631 closed 3 years ago

JakeDean3631 commented 3 years ago

Describe the bug Configuration names must begin with a letter in order to be imported into an Automation Account. If VM names begin with a number (example: "2019-WindowsServer"). The Export-AzDscConfiguration function currently names configuration scripts based on the VM name

To Reproduce Steps to reproduce the behavior:

  1. Run New-AzSystemData against a resource group with VMs with names that begin in a number.
  2. Run Export-AzDscConfigurations and see that the configuration scripts will be named the same as the VM Name
  3. Running Import-AzDscConfigurations will fail because the configuration name does not begin in a letter.

Expected behavior AzDscConfiguration scripts are imported into the Azure Automation Account successfully.

Screenshots image

Additional context Export-AzDscConfigurations should name the config to begin with "STIG_" to remediate the issue.