This command renames the local computer to and then restarts automatically.
In my Test environment the command would be alike:
Rename-Computer -NewName “w2016DC2” -DomainCredential test.test\administrator -Restart
which translates into:
Rename-Computer -NewName “desired_name” -DomainCredential “domain\username”-Restart
Modify the following parameters:
“w2016DC2” (your desired computer name)
test.test\administrator ( AD account needed )
Domain admin credentials or either an account with the sufficient permissions-delegation.
This will be displayed once done, following a computer restart.
once the credentials are introduced, will be in our domain after the restart.
All of the parameter inputs
Rename-Computer
[-ComputerName ]
[-PassThru]
[-DomainCredential ]
[-LocalCredential ]
[-NewName]
[-Force]
[-Restart]
[-WsmanAuthentication ]
[-Protocol ]
[-WhatIf]
[-Confirm]
[]
a quick reference TechNet guide
The article title indicates there´s a domain join involed, the commandlet only shows instructions on how to rename a workstation already joined to a domain. The screenshots also shows DC01 as a machine name which is not the name used for the rename command. This article is severaly lacking and unclear and needs rework.