Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

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.

  • -TargetType Parameter specifies the type of the directory object.
  • -TargetObjectId Parameter specifies the ID of directory object to which to assign settings.
  • -DirectorySetting Parameter Create a new setting using templates from DirectorySettingTemplates
  • -Id Parameter 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

-Id

Specifies the ID of a settings object.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-TargetObjectId

Specifies the object ID of directory object.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-TargetType

Specifies the target type of a directory object.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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.

Related Links


Feedback

Was this page helpful?