# Login-User

Logs a user in and performs further script instructions in the context of the user.

## Syntax

Login-User \[-Identity] \<GenericIdentity> \[-Password] \<String>

## Detailed Description

Logs a user in and performs further script instructions in the context of the user.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

## Parameters

### -Identity \<GenericIdentity>

User name including domain. If no domain is specified - 'sitecore' will be used as the default value

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | 1     |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Password \<String>

Password for the account provided using the -Identity parameter.

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | 2     |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE

```powershell
PS master:\> Login-User -Identity "sitecore\admin" -Password "b"
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/>


---

# 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://doc.sitecorepowershell.com/appendix/security/login-user.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.
