Skip to content

Commit 449b41a

Browse files
committed
removed intiatives CLI
1 parent 972f03c commit 449b41a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

articles/azure-monitor/essentials/diagnostics-settings-policies-deployifnotexists.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Select your subscription and set your resource group
107107
$rg = Get-AzResourceGroup -Name <resource groups name>
108108
```
109109

110-
1. Get the policy defintiion and configure the parameters for the policy. In the example below we assign the policy to send keyVault logs to a Log Analytics workspace
110+
1. Get the policy definition and configure the parameters for the policy. In the example below we assign the policy to send keyVault logs to a Log Analytics workspace
111111
```azurepowershell
112112
$definition = Get-AzPolicyDefinition |Where-Object Name -eq 6b359d8f-f88d-4052-aa7c-32015963ecc1
113113
$params = @{"logAnalytics"="/subscriptions/<subscriptionID/resourcegroups/<resourcgroup>/providers/microsoft.operationalinsights/workspaces/<log anlaytics workspace name>"}
@@ -171,13 +171,13 @@ For more information on remediation tasks, see [Remediate non-compliant resource
171171
## Assign initiatives
172172

173173
Initiatives are collections of policies. There are three initiatives for Azure Monitor Diagnostics settings:
174-
+ [Enable audit category group resource logging for supported resources to Event Hub](https://portal.azure.com/?feature.customportal=false&feature.canmodifystamps=true&Microsoft_Azure_Monitoring_Logs=stage1&Microsoft_OperationsManagementSuite_Workspace=stage1#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F1020d527-2764-4230-92cc-7035e4fcf8a7/scopes~/%5B%22%2Fsubscriptions%2Fd0567c0b-5849-4a5d-a2eb-5267eae1bbc7%22%5D)
174+
+ [Enable audit category group resource logging for supported resources to Event Hubs](https://portal.azure.com/?feature.customportal=false&feature.canmodifystamps=true&Microsoft_Azure_Monitoring_Logs=stage1&Microsoft_OperationsManagementSuite_Workspace=stage1#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F1020d527-2764-4230-92cc-7035e4fcf8a7/scopes~/%5B%22%2Fsubscriptions%2Fd0567c0b-5849-4a5d-a2eb-5267eae1bbc7%22%5D)
175175
+ [Enable audit category group resource logging for supported resources to Log Analytics](https://portal.azure.com/?feature.customportal=false&feature.canmodifystamps=true&Microsoft_Azure_Monitoring_Logs=stage1&Microsoft_OperationsManagementSuite_Workspace=stage1#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2Ff5b29bc4-feca-4cc6-a58a-772dd5e290a5/scopes~/%5B%22%2Fsubscriptions%2Fd0567c0b-5849-4a5d-a2eb-5267eae1bbc7%22%5D)
176176
+ [Enable audit category group resource logging for supported resources to storage](https://portal.azure.com/?feature.customportal=false&feature.canmodifystamps=true&Microsoft_Azure_Monitoring_Logs=stage1&Microsoft_OperationsManagementSuite_Workspace=stage1#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F8d723fb6-6680-45be-9d37-b1a4adb52207/scopes~/%5B%22%2Fsubscriptions%2Fd0567c0b-5849-4a5d-a2eb-5267eae1bbc7%22%5D)
177177

178178
In this example, we assign an initiative for sending audit logs to a Log Analytics workspace.
179179

180-
### [Azure portal](#tab/portal)
180+
### [Azure portal](#tab/portal1)
181181

182182
1. From the policy **Definitions** page, select your scope.
183183

@@ -211,26 +211,23 @@ Change the default name in the **Parameters** tab of the **Assign initiative** o
211211

212212
:::image type="content" source="./media/diagnostics-settings-policies-deployifnotexists/edit-initiative-assignment.png" alt-text="A screenshot showing the edit-initiative-assignment page with the checkbox unselected.":::
213213

214-
### [CLI](#tab/cli)
215-
TBD
216-
217-
### [PowerShell](#tab/Powershell)
214+
### [PowerShell](#tab/Powershell1)
218215

219216

220-
1. Set up your environemnt variables
217+
1. Set up your environment variables
221218
```azurepowershell
222219
# Set up your environment variables.
223220
$subscriptionId = <your subscription ID>;
224221
$rg = Get-AzResourceGroup -Name <your resource group name>;
225222
Select-AzSubscription $subscriptionId;
226-
$logAnlayticsWorskspaceId=</subscriptions/$subscriptionId/resourcegroups/$rg.ResourceGroupName/providers/microsoft.operationalinsights/workspaces/<your log analytics workspace>>;
223+
$logAnlayticsWorskspaceId=</subscriptions/$subscriptionId/resourcegroups/$rg.ResourceGroupName/providers/microsoft.operationalinsights/workspaces/<your log analytics workspace>;
227224
```
228-
1. Get the initiative defintion. In this example we'll use Initiative *Enable audit category group resource logging for supported resources to `
225+
1. Get the initiative definition. In this example, we'll use Initiative *Enable audit category group resource logging for supported resources to `
229226
Log Analytics*, ResourceID "/providers/Microsoft.Authorization/policySetDefinitions/f5b29bc4-feca-4cc6-a58a-772dd5e290a5"
230227
```azurepowershell
231228
$definition = Get-AzPolicySetDefinition |Where-Object ResourceID -eq /providers/Microsoft.Authorization/policySetDefinitions/f5b29bc4-feca-4cc6-a58a-772dd5e290a5;
232229
```
233-
1. Set an assignment name and configure parameters. For this initiative, the parameters include the Log Analytics workspace id.
230+
1. Set an assignment name and configure parameters. For this initiative, the parameters include the Log Analytics workspace ID.
234231
```azurepowershell
235232
$assignmentName=<your assignment name>;
236233
$params = @{"logAnalytics"="/subscriptions/$subscriptionId/resourcegroups/$($rg.ResourceGroupName)/providers/microsoft.operationalinsights/workspaces/<your log analytics workspace>"}

0 commit comments

Comments
 (0)