< Back

Export-AzureRmAutomationDscConfiguration

Tue Jan 29, 2019 9:31 pm

NAME Export-AzureRmAutomationDscConfiguration



SYNOPSIS

Exports a DSC configuration from Automation to a local file.





SYNTAX

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

<IAzureContextContainer>] [-Force] -Name <String> [-OutputFolder <String>] [-Slot {Published | Draft}] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Export-AzureRmAutomationDscConfiguration cmdlet exports an APS Desired State Configuration (DSC) configuration from Azure Automation to a

local file. The exported file has a .ps1 file name extension.





PARAMETERS

-AutomationAccountName <String>

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



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



-Force [<SwitchParameter>]

Indicates that this cmdlet replaces an existing local file with a new file that has the same name.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-OutputFolder <String>

Specifies the output folder where this cmdlet exports the DSC configuration.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Slot <String>

Specifies which version of the DSC configuration that this cmdlet exports. Valid values are:



- Draft



- Published





The default value is Published.





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

System.IO.DirectoryInfo







NOTES









Example 1: Export the published version of a DSC configuration



PS C:\\>Export-AzureRmAutomationDscConfiguration -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Name

"Configuration01" -Slot Published -OutputFolder "C:\\Users\\PattiFuller\\Desktop"



This command exports the published version of a DSC configuration in Automation to the specified folder, which is the desktop.







RELATED LINKS

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

Get-AzureRmAutomationDscConfiguration

Import-AzureRmAutomationDscConfiguration