Import-​Azure​Rm​Automation​Dsc​Configuration

Imports a DSC configuration into Automation.

Syntax

Import-AzureRmAutomationDscConfiguration
      [-ResourceGroupName] <String>
      [-AutomationAccountName] <String>
      [-Description <String>]
      [-Force]
      [-LogVerbose <Boolean>]
      [-Published]
      -SourcePath <String>
      [-Tags <IDictionary>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Import-AzureRmAutomationDscConfiguration cmdlet imports an APS Desired State Configuration (DSC) configuration into Azure Automation. Specify the path of an APS script that contains a single DSC configuration.

Examples

Example 1: Import a DSC configuration into Automation

PS C:\>Import-AzureRmAutomationDscConfiguration -AutomationAccountName "Contoso17"-ResourceGroupName "ResourceGroup01" -SourcePath "C:\DSC\client.ps1" -Force

This command imports the DSC configuration in the file named client.ps1 into the Automation account named Contoso17. The command specifies the Force parameter. If there is an existing DSC configuration, this command replaces it.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account into which this cmdlet imports a DSC configuration.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of a resource group for which this cmdlet imports a DSC configuration.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SourcePath

Specifies the path of the wps_2 script that contains the DSC configuration that this cmdlet imports.

Type:String
Aliases:Path
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description of the configuration that this cmdlet imports.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Force

Indicates that this cmdlet replaces an existing DSC configuration in Automation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogVerbose

Specifies whether this cmdlet turns verbose logging on or off for compilation jobs of this DSC configuration. Specify a value of $True to turn verbose logging on or $False to turn it off.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Published

Indicates that this cmdlet imports the DSC configuration in the published state.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tags

Specifies a dictionary of tags.

Type:IDictionary
Aliases:Tag
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False