Edit

Share via


Set-EntraBetaDirectorySetting

Updates a directory setting in Microsoft Entra ID.

Syntax

Default (Default)

Set-EntraBetaDirectorySetting

    -DirectorySetting <DirectorySetting>
    -Id <String>
    [<CommonParameters>]

Description

The Set-EntraBetaDirectorySetting cmdlet updates a directory setting in Microsoft Entra ID.

Examples

Example 1: updates a directory setting

Connect-Entra -Scopes 'Directory.ReadWrite.All', 'Policy.ReadWrite.Authorization'
$TemplateId = (Get-EntraBetaDirectorySettingTemplate | where { $_.DisplayName -eq 'Group.Unified' }).Id
$Template = Get-EntraBetaDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ
$Setting = $Template.CreateDirectorySetting()
$Setting["EnableMIPLabels"] = 'False'
$params = @{
    Id = 'aaaaaaaa-1111-1111-1111-000000000000'
    DirectorySetting = $Setting
}
Set-EntraBetaDirectorySetting @params

This example updates directory settings object in Microsoft Entra ID.

  • -DirectorySetting Parameter updates the property of directory settings.
  • -Id Parameter specifies the ID of a setting object

Parameters

-DirectorySetting

Specifies the directory settings.

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 in Microsoft Entra ID.

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.