Edit

Share via


Start-AzAutomationDscCompilationJob

Compiles a DSC configuration in Automation.

Syntax

Default (Default)

Start-AzAutomationDscCompilationJob
    [-ConfigurationName] <String>
    [-Parameters <IDictionary>]
    [-ConfigurationData <IDictionary>]
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncrementNodeConfigurationBuild]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Start-AzAutomationDscCompilationJob cmdlet compiles an APS Desired State Configuration (DSC) configuration in Azure Automation.

Examples

Example 1: Compile an Azure DSC configuration in Automation

$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
Start-AzAutomationDscCompilationJob -ConfigurationName "Config01" -Parameters $Params -ResourceGroupName "ResourceGroup01"

The first command creates a dictionary of parameters, and stores them in the $Params variable. The second command compiles the DSC configuration named Config01. The command includes the values in $Params for DSC configuration parameters.

Example 2: Compile an Azure DSC configuration in Automation with a new Node Configuration build version.

$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
Start-AzAutomationDscCompilationJob -ConfigurationName "Config01" -Parameters $Params -ResourceGroupName "ResourceGroup01" -IncrementNodeConfigurationBuild

Similar to the first example, the first command creates a dictionary of parameters, and stores them in the $Params variable. The second command compiles the DSC configuration named Config01. The command includes the values in $Params for DSC configuration parameters. It does not override the earlier existing Node Configuration by creating a new Node Configuration with the name Config01[<2>].<NodeName>. The version number is incremented based on the existing version number already present.

Parameters

-AutomationAccountName

Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ConfigurationData

Specifies a dictionary of configuration data for DSC configuration.

Parameter properties

Type:IDictionary
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConfigurationName

Specifies the name of the DSC configuration that this cmdlet compiles.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Name

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncrementNodeConfigurationBuild

Creates a new Node Configuration build version.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Parameters

Specifies a dictionary of parameters that this cmdlet uses to compile the DSC configuration.

Parameter properties

Type:IDictionary
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of a resource group in which this cmdlet compiles a configuration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

CompilationJob