Skip to content

Commit d213594

Browse files
committed
Freshness
1 parent 29b2f91 commit d213594

1 file changed

Lines changed: 87 additions & 76 deletions

File tree

Lines changed: 87 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
---
22
title: Deploy Azure Monitor for SAP solutions by using Azure PowerShell
3-
description: Learn how to use Azure PowerShell to deploy Azure Monitor for SAP solutions.
3+
description: Learn how to deploy Azure Monitor for SAP solutions and create provider instances by using Azure PowerShell.
44
author: sameeksha91
55
ms.author: sakhare
6-
ms.topic: quickstart
6+
ms.topic: how-to
77
ms.service: sap-on-azure
88
ms.subservice: sap-monitor
9-
ms.date: 08/22/2024
9+
ms.date: 03/30/2026
1010
ms.devlang: azurepowershell
1111
ms.custom: devx-track-azurepowershell, mode-api
12-
# Customer intent: As a developer, I want to deploy Azure Monitor for SAP solutions by using PowerShell so that I can create resources by using PowerShell.
12+
#Customer intent: As a system administrator, I want to deploy Azure Monitor for SAP solutions by using Azure PowerShell so that I can automate resource creation and configure monitoring providers.
1313
---
1414

15-
# Quickstart: Deploy Azure Monitor for SAP solutions by using PowerShell
15+
# Deploy Azure Monitor for SAP solutions by using Azure PowerShell
1616

17-
In this quickstart, get started with Azure Monitor for SAP solutions by using the [Az.Workloads](/powershell/module/az.workloads) PowerShell module to create Azure Monitor for SAP solutions resources. You create a resource group, set up monitoring, and create a provider instance.
17+
Azure Monitor for SAP solutions is an Azure-native monitoring product for SAP landscapes that run on Azure. If your critical SAP applications run on Azure, use it to monitor their availability, performance, and operation.
18+
19+
In this quickstart, you use Azure PowerShell to deploy an Azure Monitor for SAP solutions resource and connect it to your SAP system through a provider instance.
1820

1921
## Prerequisites
2022

2123
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn) before you begin.
22-
- If you choose to use PowerShell locally, this article requires that you install the Az PowerShell module. Connect to your Azure account by using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet. For more information about installing the Az PowerShell module, see [Install Azure PowerShell](/powershell/azure/install-az-ps). Alternately, you can use [Azure Cloud Shell](../../cloud-shell/overview.md).
24+
- To use Azure PowerShell locally, install the Az PowerShell module and connect to your Azure account by using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet. For more information about installing the Az PowerShell module, see [Install Azure PowerShell](/powershell/azure/install-az-ps). Alternatively, you can use [Azure Cloud Shell](../../cloud-shell/overview.md).
2325

2426
Install the **Az.Workloads** PowerShell module by running this command:
2527

2628
```azurepowershell-interactive
2729
Install-Module -Name Az.Workloads
2830
```
2931

30-
- If you have multiple Azure subscriptions, select the subscription in which the resources should be billed by using the
31-
[Set-AzContext](/powershell/module/az.accounts/set-azcontext) cmdlet:
32+
- If you have multiple Azure subscriptions, use the [Set-AzContext](/powershell/module/az.accounts/set-azcontext) cmdlet to select the subscription that you want to use for billing:
3233

3334
```azurepowershell-interactive
3435
Set-AzContext -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
@@ -37,76 +38,83 @@ In this quickstart, get started with Azure Monitor for SAP solutions by using th
3738
- Create or choose a virtual network for Azure Monitor for SAP solutions that has access to the source SAP system's virtual network.
3839
- Create a subnet with an address range of IPv4/25 or larger in the virtual network associated with Azure Monitor for SAP solutions, with subnet delegation assigned to **Microsoft.Web/serverFarms**.
3940

40-
> [!div class="mx-imgBorder"]
41-
> ![Screenshot that shows subnet creation for Azure Monitor for SAP solutions.](./media/quickstart-powershell/subnet-creation.png)
41+
> [!div class="mx-imgBorder"]
42+
> ![Screenshot that shows subnet creation for Azure Monitor for SAP solutions.](./media/quickstart-powershell/subnet-creation.png)
4243
4344
## Create a resource group
4445

45-
Create an [Azure resource group](../../azure-resource-manager/management/overview.md) by using the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) cmdlet. A resource group is a logical container in which Azure resources are deployed and managed as a group.
46+
Create an [Azure resource group](../../azure-resource-manager/management/overview.md) by using the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) cmdlet. A resource group is a logical container in which you deploy and manage Azure resources as a group.
4647

47-
The following example creates a resource group with the specified name and in the specified location:
48+
Run the following command to create a resource group with the specified name and in the specified location:
4849

4950
```azurepowershell-interactive
5051
New-AzResourceGroup -Name Contoso-AMS-RG -Location <myResourceLocation>
5152
```
5253

5354
## Create an SAP monitor
5455

55-
To create an SAP monitor, use the [New-AzWorkloadsMonitor](/powershell/module/az.workloads/new-azworkloadsmonitor) cmdlet. The following example creates an SAP monitor for the specified subscription, resource group, and resource name:
56+
To create an SAP monitor, use the [New-AzWorkloadsMonitor](/powershell/module/az.workloads/new-azworkloadsmonitor) cmdlet.
5657

57-
```azurepowershell-interactive
58-
$monitor_name = 'Contoso-AMS-Monitor'
59-
$rg_name = 'Contoso-AMS-RG'
60-
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
61-
$location = 'eastus'
62-
$managed_rg_name = 'MRG_Contoso-AMS-Monitor'
63-
$subnet_id = '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/ams-vnet-rg/providers/Microsoft.Network/virtualNetworks/ams-vnet-eus/subnets/Contoso-AMS-Monitor'
64-
$route_all = 'RouteAll'
58+
1. Run the following command to create an SAP monitor for the specified subscription, resource group, and resource name:
6559

66-
New-AzWorkloadsMonitor -Name $monitor_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -Location $location -AppLocation $location -ManagedResourceGroupName $managed_rg_name -MonitorSubnet $subnet_id -RoutingPreference $route_all
67-
```
60+
```azurepowershell-interactive
61+
$monitor_name = 'Contoso-AMS-Monitor'
62+
$rg_name = 'Contoso-AMS-RG'
63+
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
64+
$location = 'eastus'
65+
$managed_rg_name = 'MRG_Contoso-AMS-Monitor'
66+
$subnet_id = '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/ams-vnet-rg/providers/Microsoft.Network/virtualNetworks/ams-vnet-eus/subnets/Contoso-AMS-Monitor'
67+
$route_all = 'RouteAll'
6868
69-
To get the properties of an SAP monitor, use the [Get-AzWorkloadsMonitor](/powershell/module/az.workloads/get-azworkloadsmonitor) cmdlet. The following example gets the properties of an SAP monitor for the specified subscription, resource group, and resource name:
69+
New-AzWorkloadsMonitor -Name $monitor_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -Location $location -AppLocation $location -ManagedResourceGroupName $managed_rg_name -MonitorSubnet $subnet_id -RoutingPreference $route_all
70+
```
7071

71-
```azurepowershell-interactive
72-
Get-AzWorkloadsMonitor -ResourceGroupName Contoso-AMS-RG -Name Contoso-AMS-Monitor
73-
```
72+
1. To get the properties of the SAP monitor, run the following command:
73+
74+
```azurepowershell-interactive
75+
Get-AzWorkloadsMonitor -ResourceGroupName Contoso-AMS-RG -Name Contoso-AMS-Monitor
76+
```
7477

7578
## Create a provider
7679

77-
### Create an SAP NetWeaver provider
80+
### [SAP NetWeaver](#tab/sap-netweaver)
7881

79-
To create an SAP NetWeaver provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates a NetWeaver provider for the specified subscription, resource group, and resource name:
82+
To create an SAP NetWeaver provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
8083

81-
```azurepowershell-interactive
82-
Set-AzContext -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
83-
```
84+
1. Run the following command to set the subscription context:
8485

85-
In the following code, `hostname` is the host name or IP address for SAP Web Dispatcher or the application server. `SapHostFileEntry` is the IP address, fully qualified domain name, or host name of every instance listed in [GetSystemInstanceList](./provider-netweaver.md#adding-netweaver-provider) point 6 (xi).
86+
```azurepowershell-interactive
87+
Set-AzContext -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
88+
```
8689

87-
```azurepowershell-interactive
88-
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
89-
$rg_name = 'Contoso-AMS-RG'
90-
$monitor_name = 'Contoso-AMS-Monitor'
91-
$provider_name = 'Contoso-AMS-Monitor-NW'
90+
1. Run the following command to create the NetWeaver provider instance.
9291

93-
$SapClientId = '000'
94-
$SapHostFileEntry = '["10.0.0.0 x01scscl1.ams.azure.com x01scscl1,10.0.0.0 x01erscl1.ams.azure.com x01erscl1,10.0.0.1 x01appvm1.ams.azure.com x01appvm1,10.0.0.2 x01appvm2.ams.azure.com x01appvm2"]'
95-
$hostname = 'x01appvm0'
96-
$instance_number = '00'
97-
$password = 'Password@123'
98-
$sapportNumber = '8000'
99-
$sap_sid = 'X01'
100-
$sap_username = 'AMS_NW'
101-
$providerSetting = New-AzWorkloadsProviderSapNetWeaverInstanceObject -SapClientId $SapClientId -SapHostFileEntry $SapHostFileEntry -SapHostname $hostname -SapInstanceNr $instance_number -SapPassword $password -SapPortNumber $sapportNumber -SapSid $sap_sid -SapUsername $sap_username -SslPreference Disabled
92+
In this code, `hostname` is the host name or IP address for SAP Web Dispatcher or the application server. `SapHostFileEntry` is the IP address, fully qualified domain name, or host name of every instance listed in [GetSystemInstanceList](./provider-netweaver.md#adding-netweaver-provider) point 6 (xi).
10293

103-
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
94+
```azurepowershell-interactive
95+
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
96+
$rg_name = 'Contoso-AMS-RG'
97+
$monitor_name = 'Contoso-AMS-Monitor'
98+
$provider_name = 'Contoso-AMS-Monitor-NW'
10499
105-
```
100+
$SapClientId = '000'
101+
$SapHostFileEntry = '["10.0.0.0 x01scscl1.ams.azure.com x01scscl1,10.0.0.0 x01erscl1.ams.azure.com x01erscl1,10.0.0.1 x01appvm1.ams.azure.com x01appvm1,10.0.0.2 x01appvm2.ams.azure.com x01appvm2"]'
102+
$hostname = 'x01appvm0'
103+
$instance_number = '00'
104+
$password = 'Password@123'
105+
$sapportNumber = '8000'
106+
$sap_sid = 'X01'
107+
$sap_username = 'AMS_NW'
108+
$providerSetting = New-AzWorkloadsProviderSapNetWeaverInstanceObject -SapClientId $SapClientId -SapHostFileEntry $SapHostFileEntry -SapHostname $hostname -SapInstanceNr $instance_number -SapPassword $password -SapPortNumber $sapportNumber -SapSid $sap_sid -SapUsername $sap_username -SslPreference Disabled
109+
110+
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
111+
```
106112

107-
### Create an SAP HANA provider
113+
### [SAP HANA](#tab/sap-hana)
108114

109-
To create an SAP HANA provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates a HANA provider for the specified subscription, resource group, and resource name:
115+
To create an SAP HANA provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
116+
117+
Run the following command to create a HANA provider for the specified subscription, resource group, and resource name:
110118

111119
```azurepowershell-interactive
112120
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -125,9 +133,11 @@ $providerSetting = New-AzWorkloadsProviderHanaDbInstanceObject -Name $dbName -Pa
125133
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
126134
```
127135

128-
### Create an operating system provider
136+
### [Operating system](#tab/os)
137+
138+
To create an operating system provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
129139

130-
To create an operating system provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates an operating system provider for the specified subscription, resource group, and resource name:
140+
Run the following command to create an operating system provider for the specified subscription, resource group, and resource name:
131141

132142
```azurepowershell-interactive
133143
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -142,9 +152,11 @@ $providerSetting = New-AzWorkloadsProviderPrometheusOSInstanceObject -Prometheus
142152
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
143153
```
144154

145-
### Create a high-availability cluster provider
155+
### [HA cluster](#tab/ha-cluster)
146156

147-
To create a high-availability cluster provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates a high-availability cluster provider for the specified subscription, resource group, and resource name:
157+
To create a high-availability cluster provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
158+
159+
Run the following command to create a high-availability cluster provider for the specified subscription, resource group, and resource name:
148160

149161
```azurepowershell-interactive
150162
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -161,9 +173,11 @@ $providerSetting = New-AzWorkloadsProviderPrometheusHaClusterInstanceObject -Clu
161173
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
162174
```
163175

164-
### Create a Microsoft SQL Server provider
176+
### [Microsoft SQL Server](#tab/sql-server)
177+
178+
To create a Microsoft SQL Server provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
165179

166-
To create a Microsoft SQL Server provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates a SQL Server provider for the specified subscription, resource group, and resource name:
180+
Run the following command to create a SQL Server provider for the specified subscription, resource group, and resource name:
167181

168182
```azurepowershell-interactive
169183
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -181,9 +195,11 @@ $providerSetting = New-AzWorkloadsProviderSqlServerInstanceObject -Password $pas
181195
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
182196
```
183197

184-
### Create an IBM Db2 provider
198+
### [IBM Db2](#tab/ibm-db2)
185199

186-
To create an IBM Db2 provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet. The following example creates an IBM Db2 provider for the specified subscription, resource group, and resource name:
200+
To create an IBM Db2 provider, use the [New-AzWorkloadsProviderInstance](/powershell/module/az.workloads/new-azworkloadsproviderinstance) cmdlet.
201+
202+
Run the following command to create an IBM Db2 provider for the specified subscription, resource group, and resource name:
187203

188204
```azurepowershell-interactive
189205
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -203,27 +219,23 @@ $providerSetting = New-AzWorkloadsProviderDB2InstanceObject -Name $dbName -Passw
203219
New-AzWorkloadsProviderInstance -MonitorName $monitor_name -Name $provider_name -ResourceGroupName $rg_name -SubscriptionId $subscription_id -ProviderSetting $providerSetting
204220
```
205221

206-
### Get properties of a provider instance
222+
---
207223

208-
To get the properties of a provider instance, use the [Get-AzWorkloadsProviderInstance](/powershell/module/az.workloads/get-azworkloadsproviderinstance) cmdlet. The following example gets the properties of:
224+
### Get properties of a provider instance
209225

210-
- A provider instance for the specified subscription.
211-
- The resource group.
212-
- The SAP monitor name.
213-
- The resource name.
226+
To get the properties of a provider instance, use the [Get-AzWorkloadsProviderInstance](/powershell/module/az.workloads/get-azworkloadsproviderinstance) cmdlet. The following example gets provider instance properties for the specified resource group and SAP monitor name:
214227

215228
```azurepowershell-interactive
216229
Get-AzWorkloadsProviderInstance -ResourceGroupName Contoso-AMS-RG -SapMonitorName Contoso-AMS-Monitor
217230
```
218231

219232
## Clean up resources
220233

221-
If you don't need the resources that you created in this article, you can delete them by using the following examples.
234+
If you don't need the resources that you created in this article, you can delete them by running the following commands.
222235

223236
### Delete the provider instance
224237

225-
To remove a provider instance, use the
226-
[Remove-AzWorkloadsProviderInstance](/powershell/module/az.workloads/remove-azworkloadsproviderinstance) cmdlet. The following example deletes an IBM DB2 provider instance for the specified subscription, resource group, SAP monitor name, and resource name:
238+
To remove a provider instance, use the [Remove-AzWorkloadsProviderInstance](/powershell/module/az.workloads/remove-azworkloadsproviderinstance) cmdlet. The following example deletes an IBM Db2 provider instance for the specified subscription, resource group, SAP monitor name, and resource name:
227239

228240
```azurepowershell-interactive
229241
$subscription_id = 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
@@ -248,18 +260,17 @@ Remove-AzWorkloadsMonitor -Name $monitor_name -ResourceGroupName $rg_name -Subsc
248260

249261
### Delete the resource group
250262

251-
The following example deletes the specified resource group and all the resources in it.
263+
The following example deletes the specified resource group and all its resources.
252264

253265
> [!CAUTION]
254-
> If resources outside the scope of this article exist in the specified resource group, they'll also be deleted.
266+
> If resources outside the scope of this article exist in the specified resource group, they're also deleted.
255267
256268
```azurepowershell-interactive
257269
Remove-AzResourceGroup -Name Contoso-AMS-RG
258270
```
259271

260-
## Next steps
261-
262-
Learn more about Azure Monitor for SAP solutions.
272+
## Related content
263273

264-
> [!div class="nextstepaction"]
265-
> [Monitor SAP on Azure](about-azure-monitor-sap-solutions.md)
274+
- [What is Azure Monitor for SAP solutions?](about-azure-monitor-sap-solutions.md)
275+
- [Quickstart: Deploy Azure Monitor for SAP solutions by using the Azure portal](quickstart-portal.md)
276+
- [Azure Monitor for SAP solutions provider types](providers.md)

0 commit comments

Comments
 (0)