> ## Documentation Index
> Fetch the complete documentation index at: https://ps365.clidsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Copy-AzAutomationRunbook

## SYNOPSIS

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

## SYNTAX

```powershell theme={null}
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.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Copy-AzAutomationRunbook -SourceAutomationAccount 'newauto' -DestinationAutomationAccount 'newauto1' -ResourceGroup 'my-rg'
```

Copies all runbooks from 'newauto' to 'newauto1'.

### EXAMPLE 2

```powershell theme={null}
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.

```yaml theme={null}
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.

```yaml theme={null}
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.

```yaml theme={null}
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.
Note: Only auto-generated folders are deleted at the end.
If you provide an existing folder, its contents are NOT cleaned up.

```yaml theme={null}
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](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[https://ps365.clidsys.com/docs/commands/Copy-AzAutomationRunbook](https://ps365.clidsys.com/docs/commands/Copy-AzAutomationRunbook)
