Skip to content

Update Get-AzRecoveryServicesBackupContainer.md, Get-AzRecoveryServicesVault.md and Wait-AzRecoveryServicesBackupJob.md #9561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/RecoveryServices/RecoveryServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
-->
## Upcoming Release
* Update 'Get-AzRecoveryServicesBackupJob.md'
* Update 'Get-AzRecoveryServicesBackupContainer.md'
* Update 'Get-AzRecoveryServicesVault.md'
* Update 'Wait-AzRecoveryServicesBackupJob.md'
* Updated service call for Unregistering container for Azure File Share

## Version 1.4.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ schema: 2.0.0
# Get-AzRecoveryServicesBackupContainer

## SYNOPSIS

Gets Backup containers.

## SYNTAX
Expand All @@ -20,32 +21,39 @@ Get-AzRecoveryServicesBackupContainer [-ContainerType] <ContainerType> [[-Backup
```

## DESCRIPTION

The **Get-AzRecoveryServicesBackupContainer** cmdlet gets a backup container.
A Backup container encapsulates data sources that are modelled as backup items.
Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
Set the vault context by using the -VaultId parameter.

## EXAMPLES

### Example 1: Get a specific container
```
PS C:\>Get-AzRecoveryServicesContainer -ContainerType "AzureVM" -Status "Registered" -Name "V2VM";

```powershell
PS C:\> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
PS C:\> Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -Status "Registered" -Name "V2VM" -VaultId $vault.ID
```

This command gets the container named V2VM of type AzureVM.

### Example 2: Get all containers of a specific type
```
PS C:\>Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MARS

```powershell
PS C:\> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
PS C:\> Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MARS -VaultId $vault.ID
```

This command gets all Windows containers that are protected by Azure Backup agent.
The *BackupManagementType* parameter is only required for Windows containers.
The **BackupManagementType** parameter is only required for Windows containers.

## PARAMETERS

### -BackupManagementType

Specifies the backup management type.
The acceptable values for this parameter are:

- AzureVM
- MARS
- AzureSQL
Expand All @@ -67,18 +75,21 @@ Accept wildcard characters: False
```

### -ContainerType

Specifies the backup container type.
The acceptable values for this parameter are:
- AzureVM

- AzureVM
- Windows
- AzureSQL
- AzureStorage
- AzureVMAppContainer

```yaml
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ContainerType
Parameter Sets: (All)
Aliases:
Accepted values: AzureVM, Windows, AzureSQL, AzureStorage, AzureWorkload
Accepted values: AzureVM, Windows, AzureSQL, AzureStorage, AzureVMAppContainer

Required: True
Position: 1
Expand All @@ -88,6 +99,7 @@ Accept wildcard characters: False
```

### -DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Expand All @@ -103,6 +115,7 @@ Accept wildcard characters: False
```

### -FriendlyName

Specifies the friendly name of the container to get.

```yaml
Expand All @@ -118,6 +131,7 @@ Accept wildcard characters: False
```

### -ResourceGroupName

Specifies the name of the resource group.
This parameter is for Azure virtual machines only.

Expand All @@ -134,8 +148,10 @@ Accept wildcard characters: False
```

### -Status

Specifies the container registration status.
The acceptable values for this parameter are:

- Registered

```yaml
Expand All @@ -152,6 +168,7 @@ Accept wildcard characters: False
```

### -VaultId

ARM ID of the Recovery Services Vault.

```yaml
Expand All @@ -166,8 +183,9 @@ Accept pipeline input: True (ByValue)
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).
### -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

Expand All @@ -186,4 +204,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[Get-AzRecoveryServicesBackupManagementServer](./Get-AzRecoveryServicesBackupManagementServer.md)

[Unregister-AzRecoveryServicesBackupContainer](./Unregister-AzRecoveryServicesBackupContainer.md)

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ schema: 2.0.0
# Get-AzRecoveryServicesVault

## SYNOPSIS

Gets a list of Recovery Services vaults.

## SYNTAX
Expand All @@ -19,26 +20,30 @@ Get-AzRecoveryServicesVault [-ResourceGroupName <String>] [-Name <String>]
```

## DESCRIPTION

The **Get-AzRecoveryServicesVault** cmdlet gets a list of Recovery Services vaults in the current subscription.

## EXAMPLES

### Example 1
```

```powershell
PS C:\> Get-AzRecoveryServicesVault
```

Get the list of vault in selected subscription.

### Example 2
```

```powershell
PS C:\> Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup"
```

Get the list of vault in resource group in selected subscription.

### Example 3
```

```powershell
PS C:\> Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
```

Expand All @@ -47,6 +52,7 @@ Get the vault in resource group with given name.
## PARAMETERS

### -DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Expand All @@ -62,6 +68,7 @@ Accept wildcard characters: False
```

### -Name

Specifies the name of the vault to query for.

```yaml
Expand All @@ -77,7 +84,8 @@ Accept wildcard characters: False
```

### -ResourceGroupName
Specifies the name of the Azure resource group in which to create or from which to retrieve the specified Recovery Services object.

Specifies the name of the Azure resource group from which to retrieve the specified Recovery Services object.

```yaml
Type: System.String
Expand All @@ -91,8 +99,9 @@ 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).
### -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

Expand All @@ -111,5 +120,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[New-AzRecoveryServicesVault](./New-AzRecoveryServicesVault.md)

[Remove-AzRecoveryServicesVault](./Remove-AzRecoveryServicesVault.md)


Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ schema: 2.0.0
# Wait-AzRecoveryServicesBackupJob

## SYNOPSIS

Waits for a Backup job to finish.

## SYNTAX
Expand All @@ -19,37 +20,29 @@ Wait-AzRecoveryServicesBackupJob [-Job] <Object> [[-Timeout] <Int64>] [-VaultId
```

## DESCRIPTION

The **Wait-AzRecoveryServicesBackupJob** cmdlet waits for an Azure Backup job to finish.
Backup jobs can take a long time.
If you run a backup job as part of a script, you may want to force the script to wait for job to finish before it continues to other tasks.
A script that includes this cmdlet can be simpler than one that polls the Backup service for the job status.
Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
Set the vault context by using the -VaultId parameter.

## EXAMPLES

### Example 1: Wait for a job to finish
```
PS C:\>
$Jobs = Get-AzRecoveryServicesBackupJob -Status InProgress
$Job = $Jobs[0]
while ( $Job.Status -ne Completed )
{
Write-Host "Waiting for completion..."
Start-Sleep -Seconds 10
$Job = Get-AzBackAzureRmRecoveryServicesBackupJob -Job $Job
}
Write-Host "Done!"
Waiting for completion...
Waiting for completion...
Waiting for completion...
Done!

```powershell
PS C:\> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
PS C:\> $Jobs = Get-AzRecoveryServicesBackupJob -Status InProgress -VaultId $vault.ID
PS C:\> Wait-AzRecoveryServicesBackupJob -Job $Jobs[0] -VaultId $vault.ID -Timeout 3600
```

This script polls the first job that is currently in progress until the job has completed.
This script polls the first job that is currently in progress until the job has completed or timeout period of 1 hour expired.

## PARAMETERS

### -DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Expand All @@ -65,6 +58,7 @@ Accept wildcard characters: False
```

### -Job

Specifies the job to wait for.
To obtain a **BackupJob** object, use the Get-AzRecoveryServicesBackupJob cmdlet.

Expand All @@ -81,6 +75,7 @@ Accept wildcard characters: False
```

### -Timeout

Specifies the maximum time, in seconds, that this cmdlet waits for the job to finish.
It is recommended to specify a time-out value.

Expand All @@ -97,6 +92,7 @@ Accept wildcard characters: False
```

### -VaultId

ARM ID of the Recovery Services Vault.

```yaml
Expand All @@ -111,8 +107,9 @@ Accept pipeline input: True (ByValue)
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).
### -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

Expand All @@ -129,5 +126,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## RELATED LINKS

[Get-AzRecoveryServicesBackupJob](./Get-AzRecoveryServicesBackupJob.md)