Skip to content

Commit 2660cd1

Browse files
authored
Merge pull request #234235 from amsliu/pim-powershell-updates
pim powershell updates
2 parents 1211908 + 1268d2c commit 2660cd1

File tree

4 files changed

+8
-177
lines changed

4 files changed

+8
-177
lines changed

.openpublishing.redirection.active-directory.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11210,6 +11210,11 @@
1121011210
"source_path_from_root": "/articles/active-directory-domain-services/create-resource-forest-powershell.md",
1121111211
"redirect_url": "/azure/active-directory-domain-services/create-forest-trust-powershell",
1121211212
"redirect_document_id": false
11213+
},
11214+
{
11215+
"source_path_from_root": "/articles/active-directory/privileged-identity-management/powershell-for-azure-ad-roles.md",
11216+
"redirect_url": "/powershell/microsoftgraph/tutorial-pim?view=graph-powershell-1.0",
11217+
"redirect_document_id": false
1121311218
}
1121411219
]
1121511220
}

articles/active-directory/privileged-identity-management/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
- name: Azure AD CLI
112112
href: /cli/azure/ad
113113
- name: Azure AD PowerShell for Graph
114-
href: /powershell/azure/active-directory/install-adv2
114+
href: /powershell/module/microsoft.graph.devicemanagement.enrolment/new-mgrolemanagementdirectoryroleeligibilityschedulerequest
115115
- name: PowerShell examples for Azure AD roles
116-
href: powershell-for-azure-ad-roles.md
116+
href: /powershell/microsoftgraph/tutorial-pim
117117
- name: Azure AD service limits
118118
href: ../enterprise-users/directory-service-limits-restrictions.md

articles/active-directory/privileged-identity-management/pim-resource-roles-activate-your-roles.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: how-to
1010
ms.tgt_pltfrm: na
1111
ms.workload: identity
1212
ms.subservice: pim
13-
ms.date: 3/15/2023
13+
ms.date: 4/14/2023
1414
ms.author: amsliu
1515
ms.reviewer: rianakarim
1616
ms.custom: pim
@@ -176,21 +176,6 @@ Status code: 201
176176
"type": "Microsoft.Authorization/RoleAssignmentScheduleRequests"
177177
}
178178
````
179-
## Activate a role with PowerShell
180-
181-
There is also an option to activate Privileged Identity Management using PowerShell. You may find more details as documented in the article [PowerShell for Azure AD roles PIM](powershell-for-azure-ad-roles.md).
182-
183-
The following is a sample script for how to activate Azure resource roles using PowerShell.
184-
185-
```powershell
186-
$managementgroupID = "<management group ID" # Tenant Root Group
187-
$guid = (New-Guid)
188-
$startTime = Get-Date -Format o
189-
$userObjectID = "<user object ID"
190-
$RoleDefinitionID = "b24988ac-6180-42a0-ab88-20f7382dd24c" # Contributor
191-
$scope = "/providers/Microsoft.Management/managementGroups/$managementgroupID"
192-
New-AzRoleAssignmentScheduleRequest -Name $guid -Scope $scope -ExpirationDuration PT8H -ExpirationType AfterDuration -PrincipalId $userObjectID -RequestType SelfActivate -RoleDefinitionId /providersproviders/Microsoft.Management/managementGroups/$managementgroupID/providers/Microsoft.Authorization/roleDefinitions/$roledefinitionId -ScheduleInfoStartDateTime $startTime -Justification work
193-
```
194179

195180
## View the status of your requests
196181

articles/active-directory/privileged-identity-management/powershell-for-azure-ad-roles.md

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)