# Enable Administrator account

The Enable Administrator account step will ensure that the local Administrator account is enabled and configured with a password (useful for troubleshooting purposes).

<figure><img src="/files/1bxCo3ThCrGveHCGrweh" alt=""><figcaption></figcaption></figure>

The value of the AdminPassword task sequence variable will be used as the password.  If this variable is not set, a default value will be retrieved.

As a best practice, Windows LAPS or similar tools should be used to reset the local Administrator account to a uniqe value that can be archived in case it is needed at a later time.

### Setting the Default Administrator Password

To set the default password, you'll leverage the variable AdminPassword which must be set before the "Enable Administrator account".  You can use PowerShell to set a variable, or the built in step definition [Set variable](/deployr/reference/step-definitions/set-variable.md).  Please note, when you set a variable, it does get logged to the DeployR log.  As mentioned above, ideally you'll use LAPS to manage and secure the local admin account post OSD.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.2pintsoftware.com/deployr/reference/step-definitions/enable-administrator-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
