< Back

Export-AzureRmAutomationRunbook

Tue Jan 29, 2019 9:31 pm

NAME Export-AzureRmAutomationRunbook



SYNOPSIS

Exports an Automation runbook.





SYNTAX

Export-AzureRmAutomationRunbook [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-DefaultProfile

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





DESCRIPTION

The Export-AzureRmAutomationRunbook cmdlet exports an Azure Automation runbook to a wps_2 script (.ps1 ) file, for wps_2 or wps_2 Workflow

runbooks, or to a graphical runbook (.graphrunbook) file, for graphical runbooks. The name of the runbook becomes the name of the exported file.





PARAMETERS

-AutomationAccountName <String>

Specifies the name of the Automation account in which this cmdlet exports a runbook.



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>]

ps_force



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the runbook that this cmdlet exports. The name of the runbook becomes the name of the export file.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-OutputFolder <String>

Specifies the path of a folder in which this cmdlet creates the export file.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Slot <String>

Specifies whether this cmdlet exports the draft or published content of the runbook. Valid values are:



- Published



- Draft



Required? false

Position? named

Default value None

Accept pipeline input? False

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 a runbook



PS C:\\>Export-AzureRmAutomationRunbook -ResourceGroupName "ResourceGroup01" -AutomationAccountName "ContosoAutomationAccount" -Name "Runbook03"

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



This command exports the published version of an Automation runbook to a user desktop.







RELATED LINKS

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

Get-AzureRmAutomationRunbook

Import-AzureRmAutomationRunbook

New-AzureRmAutomationRunbook

New-AzureRmAutomationRunbook

Publish-AzureRmAutomationRunbook

Remove-AzureRmAutomationRunbook

Set-AzureRmAutomationRunbook

Start-AzureRmAutomationRunbook