问题描述
我正在尝试使用Powershell在名为Branches的OU下添加称为Calder的OU,但我一直收到错误 New-ADOrganizationalUnit:服务器不愿处理该请求.
,同时我也在运行powershell作为管理员
I am trying use powershell to add OU called Calder under an OU called Branches but I keep getting the error New-ADOrganizationalUnit : The server is unwilling to process the request.
, Also I am running powershell as a admin
这是我放入Powershell中的内容
Here is what I put in powershell
New-ADOrganizationalUnit "Calder" -Path "OU=Branches, DC=company.epl, DC=local
这是完整的错误
推荐答案
当我输入完全合格的DN时,通常会看到此错误.如果是这样,使用搜索来获取预期的OU对象会有所帮助.
I've generally seen this error when I've got my fully qualified DN mistyped. If that is the case, using a search to grab the intended OU object helps.
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
,以查看是否有更好的指示确切说明了什么地方出了问题.
If it's not just an incorrect OU path, try appending -Verbose
to the command and see if there's a better indication of what exactly went awry.
这篇关于服务器不愿意处理请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!