Unjoin Domain
Removes the computer from its Active Directory domain and puts it in the workgroup WORKGROUP. Optionally deletes the computer object in Active Directory.
Parameters
Section titled “Parameters”Domain User Name
Section titled “Domain User Name”Required
Domain account with permission to unjoin the computer from domain. Ex. CONTOSO\Administrator
Password
Section titled “Password”Required
Password for the domain account.
Delete Computer Object
Section titled “Delete Computer Object”Optional — Default: False
Enable to delete this computer’s object in Active Directory after the computer has left the domain, so it can later join again in any OU without an old object in the way. Disable to leave the object in Active Directory.\n\nWarning: deleting the object also deletes the BitLocker recovery keys and the local administrator password (LAPS) stored on it, and the computer’s group memberships. If the disk stays encrypted, save its recovery key somewhere else first.\n\nThe domain account must be allowed to delete computer objects in the OU where the object is. If it is not, the computer still leaves the domain, the object stays, and the step fails with a message saying so.
Allow Reboot
Section titled “Allow Reboot”Optional — Default: True
Enable to reboot the workstation after successful domain unjoin. Disable to continue without rebooting.
Details
Section titled “Details”- Category: Provisioning
- Brick ID:
AD-UnjoinDomain
{ "category": "provisioning", "description": "Removes the computer from its Active Directory domain and puts it in the workgroup WORKGROUP. Optionally deletes the computer object in Active Directory.", "developerVendor": "CapaSystems A/S", "displayName": null, "id": "AD-UnjoinDomain", "name": "Unjoin Domain", "parameters": [ { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "Domain account with permission to unjoin the computer from domain. Ex. CONTOSO\\Administrator", "id": "UserName", "name": "Domain User Name", "regExValidation": "", "required": true, "type": "TextBox", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "", "defaultValueObject": null, "description": "Password for the domain account.", "id": "Base64Password", "name": "Password", "regExValidation": "", "required": true, "type": "TextBoxWithPassword", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "False", "defaultValueObject": null, "description": "Enable to delete this computer's object in Active Directory after the computer has left the domain, so it can later join again in any OU without an old object in the way. Disable to leave the object in Active Directory.\\n\\nWarning: deleting the object also deletes the BitLocker recovery keys and the local administrator password (LAPS) stored on it, and the computer's group memberships. If the disk stays encrypted, save its recovery key somewhere else first.\\n\\nThe domain account must be allowed to delete computer objects in the OU where the object is. If it is not, the computer still leaves the domain, the object stays, and the step fails with a message saying so.", "id": "DeleteComputerObject", "name": "Delete Computer Object", "regExValidation": "", "required": false, "type": "Boolean", "value": null, "values": [], "valuesObject": null }, { "allowManualInput": false, "defaultValue": "True", "defaultValueObject": null, "description": "Enable to reboot the workstation after successful domain unjoin. Disable to continue without rebooting.", "id": "AllowReboot", "name": "Allow Reboot", "regExValidation": "", "required": false, "type": "Boolean", "value": null, "values": [], "valuesObject": null } ], "powershell": { "base64Encoded": true, "function": "ZnVuY3Rpb2..." }, "type": "powerbrick", "version": "2026.10.6.1"}