Skip to content

Rename Computer

Renames the computer. Works both before and after the computer has been joined to a domain - when the computer is already a domain member, a domain account with permission to rename the computer object must be supplied.\n\nA restart is always required before the new name takes effect. Either let this brick restart the computer, or add the Restart Computer brick as a later step in the workflow.

Required

The new name of the computer. It must be 1 to 15 characters long and may only contain letters, digits and hyphens. It cannot start or end with a hyphen and cannot consist of digits only.\n\nExample: PC-000123\n\nCharacters such as . \ / : * ? “ < > | and spaces are not allowed, and a name that does not follow these rules will make the step fail.\n\nTip - one name per device: a name typed in here is given to every device the workflow runs on, so a fixed name only fits a workflow that targets a single device. To let each device get its own name, add an Execute PowerShell Snippet brick earlier in the same workflow, let it work out the name from something unique to the device - the serial number, the model, a lookup in an asset list - store the result in a global variable, and write that variable in this field instead of a fixed name.\n\nExample - the snippet brick names the device after its serial number:\n$global:NewComputerName = ‘PC-’ + (Get-CimInstance Win32_BIOS).SerialNumber\n\nThis field is then filled in with $global:NewComputerName and every device gets its own name from one workflow. Check what the snippet produces before you use it on a fleet: some virtual machines and unbranded hardware report a serial number that is too long or contains spaces, and the step then stops with an error instead of renaming.

Optional

Domain account with permission to rename the computer object in Active Directory. Example: CONTOSO\Administrator\n\nOnly needed when the computer is already joined to a domain. Leave empty when the computer is renamed before the domain join.

Optional

Password for the domain account. Only needed when the computer is already joined to a domain. Leave empty when the computer is renamed before the domain join.

Optional — Default: True

Enable to restart the computer right after a successful rename so the new name takes effect immediately. Disable to continue the workflow without restarting - the new name is then only applied after the next restart.

  • Category: Provisioning
  • Brick ID: Computer-Rename