Skip to content

Commit ec6d26e

Browse files
v-yuzhichenZiyue Zheng
andauthored
Fix Az.Monitor Syntax Errors (#17694)
* Fix Az.Monitor Syntax Errors * Fix Az.Monitor Syntax Errors * Delete Monitor - 快捷方式.lnk Co-authored-by: Ziyue Zheng <[email protected]>
1 parent 716a28f commit ec6d26e

14 files changed

+18
-18
lines changed

src/Monitor/Monitor/help/Add-AzWebtestAlertRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma
3030

3131
### Example 1: Add a webtest alert rule
3232
```powershell
33-
Add-AzWebtestAlertRule -Name "webtestRule" -Location "East US" -ResourceGroup "Default-Web-EastUS" -WindowSize 00:05:00 -MetricName "metric" -TargetResourceUri "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/Default-Web-WestUS/providers/Microsoft.Insights/webtests/leowebtestr1-webtestr1" -Description "Nice Webtest rule" -Failed 3
33+
Add-AzWebtestAlertRule -Name "webtestRule" -Location "East US" -ResourceGroup "Default-Web-EastUS" -WindowSize 00:05:00 -MetricName "metric" -TargetResourceUri "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/Default-Web-WestUS/providers/Microsoft.Insights/webtests/leowebtestr1-webtestr1" -Description "Nice Webtest rule" -FailedLocationCount 3
3434
```
3535

3636
```output

src/Monitor/Monitor/help/Disable-AzActivityLogAlert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This command changes the tags property of the activity log alert called alert1 a
4747

4848
### Example 2: Disable an activity log alert using a PSActivityLogAlertResource object as input
4949
```powershell
50-
$obj = Get-AzActivityLogAlert -ResourceGroup "Default-activityLogAlerts" -Name "alert1"
50+
$obj = Get-AzActivityLogAlert -ResourceGroupName "Default-activityLogAlerts" -Name "alert1"
5151
Disable-AzActivityLogAlert -InputObject $obj
5252
```
5353

src/Monitor/Monitor/help/Enable-AzActivityLogAlert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This command enables the activity log alert called alert1 in the resource group
4646

4747
### Example 2: Enable an activity log alert using a PSActivityLogAlertResource object as input
4848
```powershell
49-
$obj = Get-AzActivityLogAlert -ResourceGroup "Default-activityLogAlerts" -Name "alert1"
49+
$obj = Get-AzActivityLogAlert -ResourceGroupName "Default-activityLogAlerts" -Name "alert1"
5050
Enable-AzActivityLogAlert -InputObject $obj
5151
```
5252

src/Monitor/Monitor/help/Get-AzActionGroup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ This command lists all the action group for the current subscription.
3838

3939
### Example 2: Get action groups for the given resource group
4040
```powershell
41-
Get-AzActionGroup -ResourceGroup "Default-activityLogAlerts"
41+
Get-AzActionGroup -ResourceGroupName "Default-activityLogAlerts"
4242
```
4343

4444
This command lists action groups for the given resource group.
4545

4646
### Example 3: Get an action group.
4747
```powershell
48-
Get-AzActionGroup -ResourceGroup "Default-activityLogAlerts" -Name "actionGroup1"
48+
Get-AzActionGroup -ResourceGroupName "Default-activityLogAlerts" -Name "actionGroup1"
4949
```
5050

5151
This command lists one (a list with a single element) action group.

src/Monitor/Monitor/help/Get-AzAutoscaleHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The **Get-AzAutoscaleHistory** cmdlet gets the history of events related to an A
2424
## EXAMPLES
2525

2626
### Example 1: Get all events associated with a subscription
27-
```
27+
```powershell
2828
Get-AzAutoscaleHistory -StartTime 2015-02-09T18:35:00 -EndTime 2015-02-09T18:40:00 -DetailedOutput
2929
```
3030

src/Monitor/Monitor/help/Get-AzDataCollectionRule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This command lists all the data collection rules for the current subscription.
7474

7575
### Example 2: Get data collection rules for the given resource group
7676
```powershell
77-
Get-AzDataCollectionRule -ResourceGroup "testgroup"
77+
Get-AzDataCollectionRule -ResourceGroupName "testgroup"
7878
```
7979

8080
```output
@@ -95,7 +95,7 @@ This command lists data collection rules for the given resource group.
9595

9696
### Example 3: Get a data collection rule
9797
```powershell
98-
Get-AzDataCollectionRule -ResourceGroup "testgroup" -RuleName "testDcr"
98+
Get-AzDataCollectionRule -ResourceGroupName "testgroup" -RuleName "testDcr"
9999
```
100100

101101
```output

src/Monitor/Monitor/help/Get-AzDataCollectionRuleAssociation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ This command lists all the data collection rules for the given target resource I
7575

7676
### Example 2: Get data collection rules associations by rule (DCR)
7777
```powershell
78-
Get-AzDataCollectionRuleAssociation -ResourceGroup $rg -RuleName $dcrName
78+
Get-AzDataCollectionRuleAssociation -ResourceGroupName $rg -RuleName $dcrName
7979
```
8080

8181
```output

src/Monitor/Monitor/help/Get-AzMetric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ This command gets detailed output for the Requests metric.
173173
```powershell
174174
$dimFilter = @((New-AzMetricFilter -Dimension City -Operator eq -Value "Seattle","Toronto"), (New-AzMetricFilter -Dimension AuthenticationType -Operator eq -Value User))
175175
176-
Get-AzMetric -ResourceId <resourceId> -MetricName PageViews -TimeGrain 00:05:00 -MetricFilter $dimFilter -StartTime 2018-02-01T12:00:00Z -EndTime 2018-02-01T12:10:00Z -AggregationType -Average
176+
Get-AzMetric -ResourceId <resourceId> -MetricName PageViews -TimeGrain 00:05:00 -MetricFilter $dimFilter -StartTime 2018-02-01T12:00:00Z -EndTime 2018-02-01T12:10:00Z -AggregationType Average
177177
```
178178

179179
```output

src/Monitor/Monitor/help/New-AzAlertRuleEmail.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The **New-AzAlertRuleEmail** cmdlet creates an e-mail action for an alert rule.
2525

2626
### Example 1: Create an alert rule email action for service owners
2727
```powershell
28-
New-AzAlertRuleEmail -SendToServiceOwners
28+
New-AzAlertRuleEmail -SendToServiceOwner
2929
```
3030

3131
This command creates an alert rule email action to send for its service owners when an alert rule is fired.
@@ -39,7 +39,7 @@ This command creates an alert rule email action for the specified email addresse
3939

4040
### Example 3: Create an alert rule email action for service owners and non-service owners
4141
```powershell
42-
New-AzAlertRuleEmail -CustomEmail [email protected] -SendToServiceOwners
42+
New-AzAlertRuleEmail -CustomEmail [email protected] -SendToServiceOwner
4343
```
4444

4545
This command creates an alert rule email action for the specified address and for its service owners.

src/Monitor/Monitor/help/New-AzMetricAlertRuleV2Criteria.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This command creates a simple metric alert criteria that can be used in a metric
6262
### Example 2: Create a dynamic metric alert criteria
6363

6464
```powershell
65-
New-AzMetricAlertRuleV2Criteria -Dynamic -MetricName "Percentage CPU" -MetricNameSpace "Microsoft.Compute/virtualMachines" -TimeAggregation Average -Operator GreaterThan -ThresholdSensitivity Medium -ViolationCount 2 -ExaminedAggregatedPointCount 4
65+
New-AzMetricAlertRuleV2Criteria -DynamicThreshold -MetricName "Percentage CPU" -MetricNameSpace "Microsoft.Compute/virtualMachines" -TimeAggregation Average -Operator GreaterThan -ThresholdSensitivity Medium -ViolationCount 2 -ExaminedAggregatedPointCount 4
6666
```
6767

6868
```output

src/Monitor/Monitor/help/Remove-AzActionGroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The **Remove-AzActionGroup** cmdlet removes an action group.
3838

3939
### Example 1: Remove an action group
4040
```powershell
41-
Remove-AzActionGroup -ResourceGroup "Default-Web-CentralUS" -Name "myActionGroup"
41+
Remove-AzActionGroup -ResourceGroupName "Default-Web-CentralUS" -Name "myActionGroup"
4242
```
4343

4444
```output

src/Monitor/Monitor/help/Remove-AzActivityLogAlert.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma
4040

4141
### Example 1: Remove an activity log alert
4242
```powershell
43-
Remove-AzActivityLogAlert -ResourceGroup "Default-Web-CentralUS" -Name "myalert"
43+
Remove-AzActivityLogAlert -ResourceGroupName "Default-Web-CentralUS" -Name "myalert"
4444
```
4545

4646
```output
@@ -53,7 +53,7 @@ Removes an activity log alert using name and resource group name as inputs.
5353

5454
### Example 2: Remove an activity log alert using a PSActivityLogAlertResource as input
5555
```powershell
56-
Get-AzActivityLogAlert -ResourceGroup "Default-activityLogAlerts" -Name "alert1" | Remove-AzActivityLogAlert
56+
Get-AzActivityLogAlert -ResourceGroupName "Default-activityLogAlerts" -Name "alert1" | Remove-AzActivityLogAlert
5757
```
5858

5959
```output

src/Monitor/Monitor/help/Remove-AzDataCollectionRuleAssociation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $dcrAssoc | Remove-AzDataCollectionRule
6565

6666
### Example 3: Delete data collection rule with the association resource ID property
6767
```powershell
68-
Remove-AzDataCollectionRule -AssociationId $dcrAssoc.Id
68+
Remove-AzDataCollectionRuleAssociation -AssociationId $dcrAssoc.Id
6969
```
7070

7171
## PARAMETERS

src/Monitor/Monitor/help/Set-AzActionGroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The **Set-AzActionGroup** cmdlet creates a new or updates an existing action gro
4646
```powershell
4747
$email1 = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress '[email protected]'
4848
$sms1 = New-AzActionGroupReceiver -Name 'user2' -SmsReceiver -CountryCode '1' -PhoneNumber '5555555555'
49-
Set-AzActionGroup -Name $actionGroupName -ResourceGroup $resourceGroupName -ShortName $shortName -Receiver $email1,$sms1
49+
Set-AzActionGroup -Name $actionGroupName -ResourceGroupName $resourceGroupName -ShortName $shortName -Receiver $email1,$sms1
5050
```
5151

5252
The first two commands create two receivers.

0 commit comments

Comments
 (0)