Set-EntraBetaObjectSetting
更新对象设置。
语法
Default (默认值)
Set-EntraBetaObjectSetting
-Id <String>
-DirectorySetting <DirectorySetting>
-TargetType <String>
-TargetObjectId <String>
[<CommonParameters>]
说明
该 cmdlet 更新Set-EntraBetaObjectSettingMicrosoft Entra ID中对象的设置。
示例
示例 1:更新设置
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
此命令更新了设置对象。
-
-TargetType参数指定目录对象的类型。 -
-TargetObjectId参数指定要向其分配设置的目录对象的 ID。 -
-DirectorySetting参数使用模板创建新设置DirectorySettingTemplates -
-Id参数指定设置对象的 ID。
参数
-DirectorySetting
指定 DirectorySetting 对象。
参数属性
| 类型: | DirectorySetting |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Id
指定设置对象的 ID。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TargetObjectId
指定目录对象的对象 ID。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TargetType
指定目录对象的目标类型。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。