Set-EntraBetaObjectSetting
Updates object settings.
Syntax
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 fromDirectorySettingTemplates
-Id
Parameter specifies the ID of a settings object.
Parameters
-DirectorySetting
Specifies a DirectorySetting object.
Type: | DirectorySetting |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Id
Specifies the ID of a settings object.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetObjectId
Specifies the object ID of directory object.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetType
Specifies the target type of a directory object.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |