Import-AzAutomationDscConfiguration
Imports a DSC configuration into Automation.
Syntax
Default (Default)
Import-AzAutomationDscConfiguration
-SourcePath <String>
[-Tags <IDictionary>]
[-Description <String>]
[-Published]
[-Force]
[-LogVerbose <Boolean>]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Import-AzAutomationDscConfiguration cmdlet imports an APS Desired State Configuration (DSC) configuration into Azure Automation.
Specify the path of an APS script that contains a single DSC configuration.
Examples
Example 1: Import a DSC configuration into Automation
Import-AzAutomationDscConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -SourcePath "C:\DSC\client.ps1" -Force
This command imports the DSC configuration in the file named client.ps1 into the Automation account
named Contoso17. The command specifies the Force parameter. If there is an existing DSC
configuration, this command replaces it.
Example 2
Imports a DSC configuration into Automation. (autogenerated)
Import-AzAutomationDscConfiguration -AutomationAccountName 'Contoso17' -Published -ResourceGroupName 'ResourceGroup01' -SourcePath 'C:\DSC\client.ps1'
Parameters
-AutomationAccountName
Specifies the name of the Automation account into which this cmdlet imports a DSC configuration.
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
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
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
-Description
Specifies a description of the configuration that this cmdlet imports.
Parameter properties
Type: String
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: True
Value from remaining arguments: False
-Force
Indicates that this cmdlet replaces an existing DSC configuration in Automation.
Parameter properties
Type: SwitchParameter
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
-LogVerbose
Specifies whether this cmdlet turns verbose logging on or off for compilation jobs of this DSC
configuration. Specify a value of $True to turn verbose logging on or $False to turn it off.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Published
Indicates that this cmdlet imports the DSC configuration in the published state.
Parameter properties
Type: SwitchParameter
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 for which this cmdlet imports a DSC 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
-SourcePath
Specifies the path of the wps_2 script that contains the DSC configuration that this cmdlet imports.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Path
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Type: IDictionary
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Tag
(All)
Position: Named
Mandatory: False
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: False
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 .
Outputs