< Back

Import-AzureRmAutomationDscConfiguration

Tue Jan 29, 2019 9:32 pm

NAME Import-AzureRmAutomationDscConfiguration



SYNOPSIS

Imports a DSC configuration into Automation.





SYNTAX

Import-AzureRmAutomationDscConfiguration [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile

<IAzureContextContainer>] [-Description <String>] [-Force] [-LogVerbose <Boolean>] [-Published] -SourcePath <String> [-Tags <IDictionary>]

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





DESCRIPTION

The Import-AzureRmAutomationDscConfiguration 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.





PARAMETERS

-AutomationAccountName <String>

Specifies the name of the Automation account into which this cmdlet imports a DSC configuration.



Required? true

Position? 1

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



-Description <String>

Specifies a description of the configuration that this cmdlet imports.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that this cmdlet replaces an existing DSC configuration in Automation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-LogVerbose <Boolean>

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.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Published [<SwitchParameter>]

Indicates that this cmdlet imports the DSC configuration in the published state.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of a resource group for which this cmdlet imports a DSC configuration.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SourcePath <String>

Specifies the path of the wps_2 script that contains the DSC configuration that this cmdlet imports.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tags <IDictionary>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

Position? named

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







NOTES









Example 1: Import a DSC configuration into Automation



PS C:\\>Import-AzureRmAutomationDscConfiguration -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.







RELATED LINKS

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

Export-AzureRmAutomationDscConfiguration

Get-AzureRmAutomationDscConfiguration