You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit the `$resourceGroup` variable with a valid value representing your resource group.
206
206
207
207
1. If you want the runbook to execute with the system-assigned managed identity, leave the code as-is. If you prefer to use a user-assigned managed identity, then:
208
-
1. From line 9, remove `$AzureContext = (Connect-AzAccount -Identity).context`,
209
-
1. Replace it with `$AzureContext = (Connect-AzAccount -Identity -AccountId <ClientId>).context`, and
208
+
1. From line 9, remove `Connect-AzAccount -Identity`,
209
+
1. Replace it with `Connect-AzAccount -Identity -AccountId <ClientId>`, and
210
210
1. Enter the Client ID you obtained earlier.
211
211
212
212
1. Select **Save** and then **Test pane**.
@@ -272,10 +272,10 @@ You can use the `ForEach -Parallel` construct to process commands for each item
272
272
Disable-AzContextAutosave -Scope Process
273
273
274
274
# Connect to Azure with system-assigned managed identity
@@ -299,8 +299,8 @@ You can use the `ForEach -Parallel` construct to process commands for each item
299
299
```
300
300
301
301
1. If you want the runbook to execute with the system-assigned managed identity, leave the code as-is. If you prefer to use a user-assigned managed identity, then:
302
-
1. From line 13, remove `$AzureContext = (Connect-AzAccount -Identity).context`,
303
-
1. Replace it with `$AzureContext = (Connect-AzAccount -Identity -AccountId <ClientId>).context`, and
302
+
1. From line 9, remove `(Connect-AzAccount -Identity)`,
303
+
1. Replace it with `(Connect-AzAccount -Identity -AccountId <ClientId>)`, and
304
304
1. Enter the Client ID you obtained earlier.
305
305
306
306
1. Select **Save**, then **Publish**, and then **Yes** when prompted.
0 commit comments