@@ -9,7 +9,7 @@ ms.service: active-directory
9
9
ms.topic : how-to
10
10
ms.subservice : roles
11
11
ms.workload : identity
12
- ms.date : 03/22/2022
12
+ ms.date : 01/25/2023
13
13
ms.author : rolyon
14
14
ms.reviewer : anandy
15
15
ms.custom : oldportal;it-pro;
@@ -66,6 +66,20 @@ Use the [New-AzureADMSAdministrativeUnit](/powershell/module/azuread/new-azuread
66
66
New-AzureADMSAdministrativeUnit -Description "West Coast region" -DisplayName "West Coast"
67
67
```
68
68
69
+ ### Microsoft Graph PowerShell
70
+
71
+ Use the [ New-MgDirectoryAdministrativeUnit] ( /powershell/module/microsoft.graph.identity.directorymanagement/new-mgdirectoryadministrativeunit ) command to create a new administrative unit.
72
+
73
+ ``` powershell
74
+ Import-Module Microsoft.Graph.Identity.DirectoryManagement
75
+ $params = @{
76
+ DisplayName = "Seattle District Technical Schools"
77
+ Description = "Seattle district technical schools administration"
78
+ Visibility = "HiddenMembership"
79
+ }
80
+ New-MgDirectoryAdministrativeUnit -BodyParameter $params
81
+ ```
82
+
69
83
### Microsoft Graph API
70
84
71
85
Use the [ Create administrativeUnit] ( /graph/api/administrativeunit-post-administrativeunits ) API to create a new administrative unit.
@@ -109,27 +123,14 @@ In Azure AD, you can delete an administrative unit that you no longer need as a
109
123
110
124
1 . To confirm that you want to delete the administrative unit, select ** Yes** .
111
125
112
- ### PowerShell - AzureAD Module
126
+ ### PowerShell
113
127
114
128
Use the [ Remove-AzureADMSAdministrativeUnit] ( /powershell/module/azuread/remove-azureadmsadministrativeunit ) command to delete an administrative unit.
115
129
116
130
``` powershell
117
131
$adminUnitObj = Get-AzureADMSAdministrativeUnit -Filter "displayname eq 'DeleteMe Admin Unit'"
118
132
Remove-AzureADMSAdministrativeUnit -Id $adminUnitObj.Id
119
133
```
120
- ### PowerShell - Microsoft Graph PowerShell SDK
121
-
122
- ```
123
- Import-Module Microsoft.Graph.Identity.DirectoryManagement
124
-
125
- $params = @{
126
- DisplayName = "Seattle District Technical Schools"
127
- Description = "Seattle district technical schools administration"
128
- Visibility = "HiddenMembership"
129
- }
130
-
131
- New-MgDirectoryAdministrativeUnit -BodyParameter $params
132
- ```
133
134
134
135
### Microsoft Graph API
135
136
0 commit comments