Start-AzureRmAutomationDscCompilationJob

Compiles a DSC configuration in Automation.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

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

-IncrementNodeConfigurationBuild

Creates a new Node Configuration build version.

Type:SwitchParameter
Position:Named
Default value:False
Required: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
Required:False
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
Required:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

CompilationJob