我正在处理一种情况,其中有两台具有相同主机名和不同IP的机器。其中之一需要重命名。我发现可以使用以下命令远程重命名计算机:
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -LocalCredential Srv01\Admin01 -DomainCredential Domain01\Admin01 -Force -PassThru
但这是接受主机名而不是IP。
任何帮助,将不胜感激。
最佳答案
从the docs:
-ComputerName
Renames the specified remote computer. The default is the local computer.
Type the NetBIOS name, an IP address, or a fully qualified domain name of a remote > computer. To specify the local computer, type the computer name, a dot (.), or localhost.
关于powershell - 在Powershell中通过IP(不是主机名)重命名计算机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57609633/