Skip to content

Commit

Permalink
Fixed New-AzSapMonitor example (#12580)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcaro authored Aug 6, 2020
1 parent 2e8d782 commit ff2140b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/HanaOnAzure/examples/New-AzSapMonitor.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
### Example 1: New SAP monitor
```powershell
PS C:\> $workspace = New-AzOperationalInsightsWorkspace -ResourceGroupName nancyc-hn1 -Name sapmonitor-test -Location westus2 -Sku "Standard"
PS C:\> $workspace = Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName nancyc-hn1 -Name sapmonitor-test
PS C:\> New-AzSapMonitor -Name ps-sapmonitor-t01 -ResourceGroupName nancyc-hn1 -Location westus2 -EnableCustomerAnalytic -MonitorSubnet "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/nancyc-hn1/providers/Microsoft.Network/virtualNetworks/vnet-sap/subnets/subnet-admin" -LogAnalyticsWorkspaceSharedKey $workspace.PrimarySharedKey -LogAnalyticsWorkspaceId $workspace.CustomerId -LogAnalyticsWorkspaceResourceId $workspace.ResourceId
PS C:\> $Workspace = New-AzOperationalInsightsWorkspace -ResourceGroupName nancyc-hn1 -Name sapmonitor-test -Location westus2 -Sku "Standard"
PS C:\> $WorkspaceKey = Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName nancyc-hn1 -Name sapmonitor-test
PS C:\> New-AzSapMonitor -Name ps-sapmonitor-t01 -ResourceGroupName nancyc-hn1 -Location westus2 -EnableCustomerAnalytic -MonitorSubnet "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/nancyc-hn1/providers/Microsoft.Network/virtualNetworks/vnet-sap/subnets/subnet-admin" -LogAnalyticsWorkspaceSharedKey $WorkspaceKey.PrimarySharedKey -LogAnalyticsWorkspaceId $Workspace.CustomerId -LogAnalyticsWorkspaceResourceId $Workspace.ResourceId
Location Name Type
-------- ---- ----
westus2 ps-sapmonitor-t01 Microsoft.HanaOnAzure/sapMonitors
```

This command creates a SAP monitor.

0 comments on commit ff2140b

Please sign in to comment.