首页 > 解决方案 > 服务器不愿意处理请求

问题描述

我正在尝试使用 powershell 在名为 Branches 的 OU 下添加名为 Calder 的 OU,但我不断收到错误New-ADOrganizationalUnit : The server is unwilling to process the request.消息,另外我正在以管理员身份运行 powershell

这是我放在powershell中的内容

New-ADOrganizationalUnit "Calder" -Path "OU=Branches, DC=company.epl, DC=local

这是完整的错误

New-ADOrganizationalUnit : 服务器不愿意处理请求 At line:1 char:1 + New-ADOrganizationalUnit "Calder" -Path "OU=Branches, DC=company.epl ... + + CategoryInfo :NotSpecified: (OU=Calder, OU+Br...y.epl, DC=local:String) [New-ADOrganizationalUnit] : ActiveDirectoryServer:O,Microsoft.ActiveDirectory.Management.Commands.NewADOrganizationalUnit

标签: powershellactive-directorypowershell-3.0

解决方案


当我的完全限定 DN 输入错误时,我通常会看到此错误。如果是这种情况,使用搜索来获取预期的 OU 对象会有所帮助。

PS> $MYOU = Get-ADOrganizationalUnit -filter 'Name -like "Branches"'
PS> $MYOU.DistinguishedName
OU=Branches,dc=MyCompany,dc=ccTLD
PS> New-ADOrganizationalUnit "Calder" -Path $MYOU.DistinguishedName


PS> Get-ADOrganizationalUnit -filter 'Name -like "Calder"'


City                     :
Country                  :
DistinguishedName        : OU=Calder,OU=Branches,dc=MyCompany,dc=ccTLD
LinkedGroupPolicyObjects : {}
ManagedBy                :
Name                     : Calder
ObjectClass              : organizationalUnit
ObjectGUID               : 559c4242-505a-c165-15d5-562b5fb99103
PostalCode               :
State                    :
StreetAddress            :

如果它不仅仅是一个不正确的 OU 路径,请尝试附加-Verbose到命令,看看是否有更好的指示究竟出了什么问题。


推荐阅读