Export-​Azure​Rm​Automation​Runbook

Exports an Automation runbook.

Syntax

Export-AzureRmAutomationRunbook
      [-ResourceGroupName] <String>
      [-AutomationAccountName] <String>
      [-Name] <String>
      [-Force]
      [-OutputFolder <String>]
      [-Slot <String>]
      [-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.

Examples

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.

Required Parameters

-AutomationAccountName

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

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

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

Type:String
Aliases:RunbookName
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

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

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

ps_force

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OutputFolder

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

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Slot

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

  • Draft
Type:String
Parameter Sets:Published, Draft
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False