小编Ral*_*gum的帖子

无法使用自动PowerShell脚本加入域 - "无法更新密码"

我正在尝试使用Powershell脚本向域添加主机.当通过CloudFormation或Ansible调用脚本时,脚本失败并显示以下错误.当我在主机上手动运行它时,它会成功.

我怀疑我做错了用户(我手动运行管理员)所以我试图强迫它一直以管理员身份运行.不幸的是,这也没有用.

有没有人见过这个问题?

错误:

> [DEBUG] Command 4-add-to-domain output: Add-Computer : Computer
> 'WIN-xxxxx' failed to join domain 
> 
> 'aws.cloud.bp.com' from its current workgroup 'WORKGROUP' with
> following error 
> 
> message: Unable to update the password. The value provided as the
> current 
> 
> password is incorrect.
> 
> At line:1 char:1
> 
> + Add-Computer -DomainName $domain -Credential $credential -OUPath $ouPath 
> 
> -Restar ...
> 
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> ~~~
> 
>     + CategoryInfo …
Run Code Online (Sandbox Code Playgroud)

aws-cloudformation ansible

5
推荐指数
2
解决办法
2765
查看次数

标签 统计

ansible ×1

aws-cloudformation ×1