我正在尝试重命名上周join我们的域的工作站。 从那以后至less重新启动一次。
我的域名基于Windows 2012 R2,所涉及的成员正在运行Windows 10 Pro。 如果这是有用的信息,我有三个区议会(是的,他们是同步的)。
重命名大部分时间工作:
$aa = Get-Credential [email protected] Rename-Computer -ComputerName mynewpc -NewName alpc001 -DomainCredential $aa WARNING: The changes will take effect after you restart the computer mynewpc.
但是我有一些固执地拒绝重新命名的机器:
Rename-Computer -ComputerName otherhp -NewName alpc005 -DomainCredential $aa Rename-Computer : Fail to rename computer 'otherhp' to 'alpc005' due to the following exception: Cannot create a file when that file already exists. At line:1 char:1 + Rename-Computer -ComputerName otherhp -NewName alpc005 -DomainCredent ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (otherhp:String) [Rename-Computer], InvalidOperationException + FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommand
这是另一个尝试:
netdom renamecomputer otherhp /newname:alpc005 /ud:contoso\administrator /pd:* Type the password associated with the domain user: This operation will rename the computer otherhp to alpc005. Certain services, such as the Certificate Authority, rely on a fixed machine name. If any services of this type are running on otherhp, then a computer name change would have an adverse impact. Do you want to proceed (Y or N)? y Cannot create a file when that file already exists. The command failed to complete successfully.
没有使用这个新名称的计算机(或其他帐户),AD DNS中也没有条目。
来自$error[0] | fl -f的附加错误报告 按照评论中的要求,如下所示:
writeErrorStream : True Exception : System.InvalidOperationException: Fail to rename computer 'otherhp' to 'alpc005' due to the following exception: Cannot create a file when that file already exists. TargetObject : otherhp CategoryInfo : OperationStopped: (otherhp:String) [Rename-Computer], InvalidOperationException FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommand ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {0, 1} PSMessageDetails :
我在用户办公室没有任何IT支持,所以我们尽可能远程地做。 如果一切都失败了,我想我可以授予最终用户足够的权限,让他们脱离个人电脑,重命名它,然后重新join。 但是如果有一个现实的select,我真的不想这样做。
感谢收到的build议,谢谢。
我已经从每个DC询问了NETDOM QUERY /Domain:{domain} WORKSTATION的输出。 个人电脑出现在所有三个列表中; 这里是结果的一个片段:
PS C:\Windows\system32> NETDOM QUERY /Domain:contoso.com /Server:DC1 WORKSTATION List of workstations with accounts in the domain: ALPC004 ( Workstation or Server ) ... OTHERHP ...
有问题的个人电脑( OTHERPC )没有( Workstation or Server )条款 – 但我的许多个人电脑都没有。
最后,我最终不得不做的是解决这个问题:
我注意到,我仍然不能重新命名这个电脑(同样的错误),但至less现在有了正确的名字。
您的问题是否可以链接到Active Directory中的旧数据? 显然有一个问题,当降级旧的Active Directory服务器的一些信息将被遗留下来。
在域控制器降级失败后,如何删除Active Directory中的数据
你有没有尝试重新命名主机/客户端,而其中一个Active Directory服务器closures? 然后另一个AD服务器?
外部信任 – 重复的域SID
您是否尝试过Rename-Computer CMD-Let的-Force参数?