< Back

Start-AzureRmAutomationDscCompilationJob

Tue Jan 29, 2019 9:33 pm

NAME Start-AzureRmAutomationDscCompilationJob



SYNOPSIS

Compiles a DSC configuration in Automation.





SYNTAX

Start-AzureRmAutomationDscCompilationJob [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-ConfigurationName] <String>

[-ConfigurationData <IDictionary>] [-DefaultProfile <IAzureContextContainer>] [-IncrementNodeConfigurationBuild] [-Parameters <IDictionary>]

[-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-AutomationAccountName <String>

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



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ConfigurationData <IDictionary>

Specifies a dictionary of configuration data for DSC configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ConfigurationName <String>

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



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IncrementNodeConfigurationBuild [<SwitchParameter>]

Creates a new Node Configuration build version.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Parameters <IDictionary>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Automation.Model.CompilationJob







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ilationjob

Get-AzureRmAutomationDscCompilationJob

Get-AzureRmAutomationDscCompilationJobOutput