Skip to main content

SYNOPSIS

Copies all runbooks from a source Azure Automation account to a destination account.

SYNTAX

Copy-AzAutomationRunbook [-SourceAutomationAccount] <String> [-DestinationAutomationAccount] <String>
 [-ResourceGroup] <String> [[-TempFolder] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function exports all runbooks from a source Azure Automation account and imports them into a destination Azure Automation account within the same resource group. Supports Managed Identity authentication for use within Azure Automation.

EXAMPLES

EXAMPLE 1

Copy-AzAutomationRunbook -SourceAutomationAccount 'newauto' -DestinationAutomationAccount 'newauto1' -ResourceGroup 'my-rg'
Copies all runbooks from ‘newauto’ to ‘newauto1’ interactively.

EXAMPLE 2

Copy-AzAutomationRunbook -SourceAutomationAccount 'newauto' -DestinationAutomationAccount 'newauto1' -ResourceGroup 'my-rg' -TempFolder 'C:\Temp\Runbooks'
Copies all runbooks using a custom temporary folder.

PARAMETERS

-SourceAutomationAccount

The name of the source Azure Automation account to export runbooks from.
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationAutomationAccount

The name of the destination Azure Automation account to import runbooks into.
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroup

The name of the resource group containing both Automation accounts.
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TempFolder

(Optional) The temporary folder path used to store exported runbooks. Defaults to a timestamped folder in the system temp directory.
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

https://ps365.clidsys.com/docs/commands/Copy-AzAutomationRunbook