Skip to content

Import-AzureRmAutomationDscConfiguration: File name shouldn't be required to match the DSC Configuration name #1803

@pcgeek86

Description

@pcgeek86

When you use the Import-AzureRmAutomationDscConfiguration command to import a PowerShell script file into an Azure Automation Account, the file name must match the DSC configuration name. If the DSC Configuration name, and the script file name that contains it, do not match, then you receive the exception below.

This is inconsistent with the Azure Portal experience, where no such naming requirement exists.

Import-AzureRmAutomationDscConfiguration : BadRequest: The configuration name in the script must match the configuration name.
At C:\Users\TrevorSullivan\Documents\Import DSC Configuration.ps1:26 char:1
+ Import-AzureRmAutomationDscConfiguration @DscConfiguration;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Import-AzureRmAutomationDscConfiguration], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.ImportAzureAutomationDscConfiguration

Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
http://trevorsullivan.net
http://twitter.com/pcgeek86

Metadata

Metadata

Assignees

Labels

AutomationService AttentionThis issue is responsible by Azure service team.automation-dscmust also have the "Automation" label

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions