Skip to content

Commit 12bb709

Browse files
Fix Az.RecoveryServices Syntax Errors (Azure#17753)
1 parent 34bb2b8 commit 12bb709

21 files changed

+40
-39
lines changed

src/RecoveryServices/RecoveryServices/help/Disable-AzRecoveryServicesBackupAutoProtection.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ The **Disable-AzRecoveryServicesBackupAutoProtection** cmdlet disables protectio
2525

2626
### Example 1
2727
```powershell
28-
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVMAppContainer -Name "TestSQLServerVM"
29-
Get-AzRecoveryServicesBackupProtectableItem -Container $container -WorkloadType "MSSQL" -ItemType "SQLInstance" -Name "MSSQLInstance"| Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType "AzureWorkload" -WorkloadType "MSSQL"
28+
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
29+
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVMAppContainer -Status "Registered" -FriendlyName "TestSQLServerVM" -VaultId $vault.ID
30+
Get-AzRecoveryServicesBackupProtectableItem -Container $container -WorkloadType "MSSQL" -ItemType "SQLInstance" -Name "MSSQLInstance" | Disable-AzRecoveryServicesBackupAutoProtection -BackupManagementType "AzureWorkload" -WorkloadType "MSSQL"
3031
```
3132

3233
The first cmdlet gets the Backup container of type AzureVMAppContainer. The second cmdlet gets the protectable BackupItem and disables auto protection.

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesAsrEvent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ List of all events.
5151

5252
### Example 2
5353
```powershell
54-
Get-AzRecoveryServicesAsrEvent -EventName "VmMonitoringEvent;9091897569816476200_84576304-bafc-4714-8ba6-197a5d09d84f"
54+
Get-AzRecoveryServicesAsrEvent -Name "VmMonitoringEvent;9091897569816476200_84576304-bafc-4714-8ba6-197a5d09d84f"
5555
```
5656

5757
```output
@@ -72,14 +72,14 @@ Get event by name.
7272

7373
### Example 3
7474
```powershell
75-
Get-AzRecoveryServicesAsrEvent -AffectedObjectName xxxxxxxxxxxxx
75+
Get-AzRecoveryServicesAsrEvent -AffectedObjectFriendlyName xxxxxxxxxxxxx
7676
```
7777

7878
List of event for affected Object.
7979

8080
### Example 4
8181
```powershell
82-
Get-AzRecoveryServicesAsrEvent -AffectedObjectName xxxxxxxxxxxx -StartTime "8/17/2017 12:31:40 PM" -EndTime "8/17/2017 12:31:44 PM" -Severity Critical -EventType VmHealth
82+
Get-AzRecoveryServicesAsrEvent -AffectedObjectFriendlyName xxxxxxxxxxxx -StartTime "8/17/2017 12:31:40 PM" -EndTime "8/17/2017 12:31:44 PM" -Severity Critical -EventType VmHealth
8383
```
8484

8585
List of event between time start time and end time , severity critical and health type VmHealth.

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesAsrProtectableItem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Gets all the protectable items in specified ASR protection container.
5656

5757
### Example 2
5858
```powershell
59-
Get-ASRProtectableItem -ProtectionContainer $pc -FriendlyName $piFriendlyName
59+
Get-AzRecoveryServicesAsrProtectableItem -ProtectionContainer $pc -FriendlyName $piFriendlyName
6060
```
6161

6262
```output
@@ -81,7 +81,7 @@ Get the protectable items in specified ASR protection container and with given f
8181

8282
### Example 3
8383
```powershell
84-
Get-ASRProtectableItem -ProtectionContainer $pc -Name $piName
84+
Get-AzRecoveryServicesAsrProtectableItem -ProtectionContainer $pc -Name $piName
8585
```
8686

8787
```output

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesBackupRecommendedArchivableRPGroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ These recovery points when moved together will lead to maximum savings.
2727
```powershell
2828
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
2929
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
30-
$rpGroup = Get-AzRecoveryServicesRecommendedArchivableRPGroup -Item $item[3] -VaultId $vault.ID
30+
$rpGroup = Get-AzRecoveryServicesBackupRecommendedArchivableRPGroup -Item $item[3] -VaultId $vault.ID
3131
```
3232

3333
Here we use **Get-AzRecoveryServicesRecommendedArchivableRPGroup** cmdlet to fetch the recommended RPs list to be moved to VaultArchive tier

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesBackupRecoveryPoint.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Set the vault context by using the -VaultId parameter.
5050
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
5151
$startDate = (Get-Date).AddDays(-7)
5252
$endDate = Get-Date
53-
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "V2VM" -VaultId $vault.ID
54-
$backupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -WorkloadType AzureVM -VaultId $vault.ID
53+
$container = Get-AzRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -FriendlyName "V2VM" -VaultId $vault.ID
54+
$backupItem = Get-AzRecoveryServicesBackupItem -Container $container -WorkloadType AzureVM -VaultId $vault.ID
5555
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupItem -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime() -VaultId $vault.ID
5656
```
5757

@@ -67,7 +67,7 @@ The last command gets an array of recovery points for the item in $BackupItem, a
6767
```powershell
6868
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
6969
$startDate = (Get-Date).AddDays(-7).ToUniversalTime()
70-
$endDate = Get-Date.ToUniversalTime()
70+
$endDate = (Get-Date).ToUniversalTime()
7171
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
7272
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -StartDate $startDate -EndDate $endDate -VaultId $vault.ID -Item $item[3]
7373
-IsReadyForMove $true -TargetTier VaultArchive
@@ -84,7 +84,7 @@ then stores them in the $rp variable.
8484
```powershell
8585
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
8686
$startDate = (Get-Date).AddDays(-7).ToUniversalTime()
87-
$endDate = Get-Date.ToUniversalTime()
87+
$endDate = (Get-Date).ToUniversalTime()
8888
$item = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -VaultId $vault.ID
8989
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -StartDate $startDate -EndDate $endDate -VaultId $vault.ID -Item $item[3]
9090
-Tier VaultStandard

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesVault.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Get the list of vault in resource group in selected subscription.
5252

5353
```powershell
5454
$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
55-
$vault.Identity | fl
55+
$vault.Identity | Format-List
5656
```
5757

5858
```output

src/RecoveryServices/RecoveryServices/help/Initialize-AzRecoveryServicesBackupProtectableItem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ the cmdlet enquires for specific workloads within a container. This triggers an
2525

2626
### Example 1
2727
```powershell
28-
Initialize-AzRecoveryServicesProtectableItem -Container $Container -WorkloadType "MSSQL"
28+
Initialize-AzRecoveryServicesBackupProtectableItem -Container $Container -WorkloadType "MSSQL"
2929
```
3030

3131
The cmdlet executes a discovery operation for new protectable items.

src/RecoveryServices/RecoveryServices/help/New-AzRecoveryServicesAsrFabric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Starts the fabric creation with passed name and returns the ASR job used to trac
3939
### Example 2
4040
```powershell
4141
$currentJob = New-AzRecoveryServicesAsrFabric -Azure -Name $fabricName -Location "eastus"
42-
Get-ASRJob -name $currentJob.id
42+
Get-AzRecoveryServicesAsrJob -name $currentJob.id
4343
```
4444

4545
Starts the azure fabric creation with passed name and returns the ASR job used to track the fabric creation operation.

src/RecoveryServices/RecoveryServices/help/New-AzRecoveryServicesAsrPolicy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Errors : {}
127127
### Example 4
128128
```powershell
129129
$Job = New-AzRecoveryServicesAsrPolicy -Name $TestPolicy1 -AzureToAzure -RecoveryPointRetentionInHours 10 -ApplicationConsistentSnapshotFrequencyInHours 5
130-
Get-AsrJob -name $Job.id
130+
Get-AzRecoveryServicesAsrJob -name $Job.id
131131
```
132132

133133
Starts the replication policy creation operation using the specified parameters and returns the ASR job used to track the operation.

src/RecoveryServices/RecoveryServices/help/New-AzRecoveryServicesAsrProtectionContainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The New-AzRecoveryServicesAsrProtectionContainer cmdlet creates a Protection Con
2525
### Example 1
2626
```powershell
2727
$job = New-AzRecoveryServicesAsrProtectionContainer -Name xyz -Fabric $fabric
28-
Get-ASRJob -name $job.id
28+
Get-AzRecoveryServicesAsrJob -name $job.id
2929
```
3030

3131
Starts the creation of the protection container with the specified parameters, and returns the ASR job used to track the operation.

0 commit comments

Comments
 (0)