Start-AzureRmAutomationDscCompilationJob

Compiles a DSC configuration in Automation.

Syntax

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

Description

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

Examples

Example 1: Compile an Azure DSC configuration in Automation

PS C:\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
PS C:\> Start-AzureRmAutomationDscCompilationJob -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.

PS C:\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
PS C:\> Start-AzureRmAutomationDscCompilationJob -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>].. The version number is incremented based on the existing version number already present.

Required Parameters

-AutomationAccountName

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

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

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

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

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

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

Optional Parameters

-ConfigurationData

Specifies a dictionary of configuration data for DSC configuration.

Type:IDictionary
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncrementNodeConfigurationBuild

Creates a new Node Configuration build version.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Parameters

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

Type:IDictionary
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Automation.Model.CompilationJob