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
Copy file name to clipboardExpand all lines: articles/update-manager/includes/pre-post-prerequisites.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,45 +8,46 @@ ms.date: 09/24/2024
8
8
9
9
## Prerequisites
10
10
11
-
1. Ensure that you are using PowerShell **7.4** runbook.
12
-
2. Assign permission to managed identities - You can assign permissions to the appropriate [managed identity](../../automation/automation-security-overview.md#managed-identities). The runbook can use either the Automation account system-assigned managed identity or a user-assigned managed identity.
11
+
1. Ensure that you're using PowerShell **7.4** runbook.
12
+
2. Assign permission to managed identities. You can assign permissions to the appropriate [managed identity](../../automation/automation-security-overview.md#managed-identities). The runbook can use either the Automation account system-assigned managed identity or a user-assigned managed identity.
13
13
14
-
For the script examples below (Start VM's and Stop VM's), the Virtual Machine Contributor role is required or a Custom Role with these specific permissions:
For the script examples below (Start VMs and Stop VMs), the Virtual Machine Contributor role is required or a Custom Role with these specific permissions:
You can use either portal or PowerShell cmdlets to assign permissions to each identity:
21
22
22
23
#### [Using Azure portal](#tab/portal)
23
24
24
-
Follow the steps in [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.yml) to assign permissions
25
+
Follow the steps in [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.yml) to assign permissions
25
26
26
27
#### [Using Azure PowerShell](#tab/powershell)
27
28
28
-
Use PowerShell cmdlet [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment) to assign a role to the system-assigned managed identity.
29
+
Use PowerShell cmdlet [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment) to assign a role to the system-assigned managed identity.
29
30
30
-
```powershell
31
-
New-AzRoleAssignment `
31
+
```powershell
32
+
New-AzRoleAssignment `
32
33
-ObjectId $SA_PrincipalId `
33
34
-ResourceGroupName $resourceGroup `
34
35
-RoleDefinitionName "Contributor"
35
-
```
36
-
37
-
Assign a role to a user-assigned managed identity.
36
+
```
37
+
38
+
Assign a role to a user-assigned managed identity.
38
39
39
-
```powershell
40
-
New-AzRoleAssignment `
40
+
```powershell
41
+
New-AzRoleAssignment `
41
42
-ObjectId $UAMI.PrincipalId `
42
43
-ResourceGroupName $resourceGroup `
43
44
-RoleDefinitionName "Contributor"
44
-
```
45
-
46
-
For the system-assigned managed identity, show `ClientId` and record the value for later use.
47
-
48
-
```powershell
49
-
$UAMI.ClientId
50
-
```
45
+
```
46
+
For the system-assigned managed identity, show `ClientId` and record the value for later use.
47
+
48
+
```powershell
49
+
$UAMI.ClientId
50
+
```
51
+
---
51
52
52
53
3. Import the `Az.ResourceGraph` module, ensure the module is updated to ThreadJob with the module version 2.0.3.
0 commit comments