> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/security/local-accounts.md).

# Local Accounts

Create and manage local accounts in PowerShell Universal, configure the default administrator account, and enforce password restrictions.

## Local Accounts

Local accounts are created and stored in the PowerShell Universal database. By default, credentials are stored in the local database vault.

To create a local account, navigate to **Secure > Identities** and create a new identity. Ensure that the Local Account switch is enabled and set a password.

If you have a licensed instance of PowerShell Universal, you can use a different credential vault.

## Admin Accounts

PowerShell Universal prompts you to configure the administrator account name and password the first time it runs, but this process can be automated by setting the `PSUDefaultAdminName` and `PSUDefaultAdminPassword` environment variables. When these variables are used, the account is created with the Administrator role and the initial password is not checked against the configured password length or complexity requirements. Password expiration still applies to the account after it is created.

If you become locked out of the server, set the `ResetAdminAccount` environment variable to `true` and restart the PowerShell Universal service. This variable must be defined at the system level so the service can access it. If no administrator account exists, PowerShell Universal creates one with the password `admin`; otherwise, it resets the existing administrator account password to `admin`.

**PSUDefaultAdminName** - Specifies the name of the administrator account to create during initial setup.\
**PSUDefaultAdminPassword** - Specifies the password for the administrator account to create during initial setup.\
**ResetAdminAccount** - Resets the administrator account password to `admin` after the PowerShell Universal service is restarted, or creates a new administrator account with that password if one does not already exist.

```powershell
$Env:PSUDefaultAdminPassword = 'MyPassword'
$Env:PSUDefaultAdminName = 'MyAdmin'
```

## Password Restrictions

By default, local account passwords must be at least 12 characters long and contain a letter, number, and symbol. Passwords expire after 90 days. Users can reset their passwords at any time in the admin console or portal.

Use `Set-PSUSetting` to change the required password length and expiration period. The following example requires 16-character passwords that expire after 180 days.

```powershell
Set-PSUSetting -PasswordLength 16 -PasswordExpirationDays 180
```

Changing a local account password with `Set-PSUIdentity -Password` restarts its password expiration period.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/security/local-accounts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
