本文介绍了如何在容器中添加域(将容器& quot;& quot;成员从WORKGROUP更改为Domain)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有容器的Windows服务器2016和已加入域的虚拟机(例如:Redmond.corp.XXXX.com),我已成功将我的应用程序推送到容器中。下一步我需要添加 域到容器。如果我看到容器当前 域
,则显示WORKGROUP。我需要更改容器"成员"从WORKGROUP到DOMAIN或需要添加域(Redmond.corp.XXXX.com)

I am using windows server 2016 with containers VM with domain joined(Ex:Redmond.corp.XXXX.com), I have successfully  push my application to the container. As a next step I need to add  domain to the container. If I see the container current domain it is showing WORKGROUP. I need to change container "member of" from WORKGROUP to DOMAIN or need add the domain (Redmond.corp.XXXX.com)

容器正在运行"user manager \containeradministrator"用户。

Container is running with "user manager\containeradministrator" user.

我在Container中使用了以下脚本来添加到域中。

I have used below script in the Container to Add to the domain.


$domain = "Redmond.corp.XXXX.com"
$password = "myPassword!"
$username = "$domain\myUserAccount"
$credential =  New-Object System.Management.Automation.PSCredential($username, ($password | ConvertTo-SecureString -asPlainText -Force))
Add-Computer -DomainName $domain -Credential $credential

获取以下错误

添加计算机:计算机'a9a33ce76a51'无法从其当前工作组中加入域'redmond.corp.XXXX.com'以及'WORKGROUP',并显示以下错误消息:没有离线加入操作待定。
在行:1字符:1
+添加计算机-DomainName $ domain -Credential $ User
+ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          :OperationStopped:(a9a33ce76a51:String)[Add-Computer],InvalidOperationException
    + FullyQualifiedErrorId:FailToJoinDomainFromWorkgroup,Microsoft.PowerShell.Commands.AddComputerCommand

Add-Computer : Computer 'a9a33ce76a51' failed to join domain 'redmond.corp.XXXX.com' from its current workgroup
'WORKGROUP' with following error message: There was no offline join operation pending.
At line:1 char:1
+ Add-Computer -DomainName $domain -Credential $User
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (a9a33ce76a51:String) [Add-Computer], InvalidOperationException
    + FullyQualifiedErrorId : FailToJoinDomainFromWorkgroup,Microsoft.PowerShell.Commands.AddComputerCommand

请帮我解决如何在容器中添加域名。

Please help me how to add domain in the container.

推荐答案


这篇关于如何在容器中添加域(将容器& quot;& quot;成员从WORKGROUP更改为Domain)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 06:15