在 Active Directory 轻量级目录服务实例中,我有点卡住了以下命令:
try
{
New-AdObject -Server $ADLDSServer -Name $($person.CN) -OtherAttributes @{'ObjectSid' = $($ADUser.objectSID) } -Path "OU=users,dc=domain,dc=test" -Type CompanyPerson -Verbose -Instance $person
}
这是创建新对象并从目标域添加对象 ID 的脚本的一部分。这与过滤器 *一起使用,我只更改了一些参数来针对一位用户进行测试。
现在,我得到的错误如下:
VERBOSE: Performing the operation "New" on target "OU=users,dc=domain,dc=test".
WARNING: The modification was not permitted for security reasons
D:\scripts\ObjectSID.PS1 : The modification was not permitted for security reasons
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,UpdateObjectSID.PS1
我获得了此实例和文件夹的权限,所以我认为这不是权限问题。请问有谁熟悉这个问题并知道如何解决?
谢谢