Set-EntraBetaObjectSetting
Updates object settings.
Syntax
Default (Default)
Set-EntraBetaObjectSetting
-Id <String>
-DirectorySetting <DirectorySetting>
-TargetType <String>
-TargetObjectId <String>
[<CommonParameters>]
Description
The Set-EntraBetaObjectSetting cmdlet updates the settings for an object in Microsoft Entra ID.
Examples
Example 1: Updates the settings
Connect-Entra -Scopes 'Directory.ReadWrite.All'
$template= Get-EntraBetaDirectorySettingTemplate | ? {$_.displayname -eq "Group.Unified.Guest"}
$settingsCopy = $template.CreateDirectorySetting()
$settingsCopy["AllowToAddGuests"]=$True
$params = @{
TargetType = 'groups'
TargetObjectId = '22cc22cc-dd33-ee44-ff55-66aa66aa66aa'
DirectorySetting = $settingsCopy
Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'
}
Set-EntraBetaObjectSetting @params
This command updated the settings object.
-TargetTypeParameter specifies the type of the directory object.-TargetObjectIdParameter specifies the ID of directory object to which to assign settings.-DirectorySettingParameter Create a new setting using templates fromDirectorySettingTemplates-IdParameter specifies the ID of a settings object.
Parameters
-DirectorySetting
Specifies a DirectorySetting object.
Parameter properties
| Type: | DirectorySetting |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Id
Specifies the ID of a settings object.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-TargetObjectId
Specifies the object ID of directory object.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-TargetType
Specifies the target type of a directory object.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.