powershell - 服务器不愿意处理请求
问题描述
我正在尝试使用 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
解决方案
当我的完全限定 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
到命令,看看是否有更好的指示究竟出了什么问题。
推荐阅读
- kubernetes - GKE 上的 GRPC 负载平衡(在 L7、HTTP/2 + TLS 上)
- python - 在 Visual Studio 2017 中使用 c++ 组件构建 python 解决方案的问题
- r - 无法在 R 中组合两个数据帧
- javascript - 在 HTML Web 浏览器中设置正确的内容类型
- javascript - 需要多次
- java - 如何让服务器 API 告诉客户端 API 有可用更新
- python - scikit-learn learning_curve 函数在输入 SVM 分类器时抛出 ValueError
- c++ - 二叉搜索树 - 实现“搜索”功能
- cassandra - Cassandra 预写日志和内存表刷新到磁盘
- python - list[::] 和 list 有什么区别?