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/active-directory/users-groups-roles/groups-settings-cmdlets.md
+63-46Lines changed: 63 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,7 @@ Office 365 Groups settings are configured using a Settings object and a Settings
30
30
31
31
The cmdlets are part of the Azure Active Directory PowerShell V2 module. For instructions how to download and install the module on your computer, see the article [Azure Active Directory PowerShell Version 2](https://docs.microsoft.com/powershell/azuread/). You can install the version 2 release of the module from [the PowerShell gallery](https://www.powershellgallery.com/packages/AzureAD/).
32
32
33
-
## Retrieve a specific settings value
34
-
If you know the name of the setting you want to retrieve, you can use the below cmdlet to retrieve the current settings value. In this example, we're retrieving the value for a setting named "UsageGuidelinesUrl." You can read more about directory settings and their names further down in this article.
35
33
36
-
```powershell
37
-
(Get-AzureADDirectorySetting).Values | Where-Object -Property Name -Value UsageGuidelinesUrl -EQ
38
-
```
39
34
40
35
## Create settings at the directory level
41
36
These steps create settings at directory level, which apply to all Office 365 groups in the directory. The Get-AzureADDirectorySettingTemplate cmdlet is available only in the [Azure AD PowerShell Preview module for Graph](https://www.powershellgallery.com/packages/AzureADPreview/2.0.0.137).
@@ -70,21 +65,27 @@ These steps create settings at directory level, which apply to all Office 365 gr
To update the value for UsageGuideLinesUrl in the setting template, simply edit the URL with Step 4 above, then perform Step 5 to set the new value.
82
+
83
+
To remove the value of UsageGuideLinesUrl, edit the URL to be an empty string using Step 4 above:
84
+
85
+
```powershell
86
+
$Setting["UsageGuidelinesUrl"] = ""
87
+
```
88
+
Then perform Step 5 to set the new value.
88
89
89
90
## Template settings
90
91
Here are the settings defined in the Group.Unified SettingsTemplate. Unless otherwise indicated, these features require an Azure Active Directory Premium P1 license.
@@ -105,7 +106,42 @@ Here are the settings defined in the Group.Unified SettingsTemplate. Unless othe
105
106
| <ul><li>AllowToAddGuests<li>Type: Boolean<li>Default: True | A boolean indicating whether or not is allowed to add guests to this directory.|
106
107
| <ul><li>ClassificationList<li>Type: String<li>Default: “” |A comma-delimited list of valid classification values that can be applied to Office 365 Groups. |
107
108
109
+
## Example: Configure Guest policy for groups at the directory level
110
+
1. Get all the setting templates:
111
+
```powershell
112
+
Get-AzureADDirectorySettingTemplate
113
+
```
114
+
2. To set guest policy for groups at the directory level, you need Group.Unified template
If you know the name of the setting you want to retrieve, you can use the below cmdlet to retrieve the current settings value. In this example, we're retrieving the value for a setting named "UsageGuidelinesUrl."
141
+
142
+
```powershell
143
+
(Get-AzureADDirectorySetting).Values | Where-Object -Property Name -Value UsageGuidelinesUrl -EQ
144
+
```
109
145
These steps read settings at directory level, which apply to all Office groups in the directory.
110
146
111
147
1. Read all existing directory settings:
@@ -124,7 +160,7 @@ These steps read settings at directory level, which apply to all Office groups i
124
160
Get-AzureADObjectSetting -TargetObjectId ab6a3887-776a-4db7-9da4-ea2b0d63c504 -TargetType Groups
125
161
```
126
162
127
-
3. Read all directory settings values of a specific directory settings object, using Settings Id GUID:
163
+
3. Read all directory settings values of a specific directory settings object, using Settings ID GUID:
These steps update settings at directory level, which apply to all Office 365 groups in the directory. These examples assume there is already a Settings object in your directory.
You can find more Azure Active Directory PowerShell documentation at [Azure Active Directory Cmdlets](/powershell/azure/install-adv2?view=azureadps-2.0).
0 commit comments