Start-AzureRmAutomationDscCompilationJob

Compiles a DSC configuration in Automation.

Caution

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

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>].<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.

Type:String
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-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

-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
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: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: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: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

-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
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:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

CompilationJob