> 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/da/powershell-commands/get-dsloginattempt.md).

# Get-DSLoginAttempt

Get-DSLoginAttempt henter logon forsøg recorded på en Devolutions Server instans, optionally filtreret af brugernavn eller dato interval.

### Synopsis

Hent logon forsøg

### Syntaks

#### \_\_AllParameterSets

```
Get-DSLoginAttempt [-DateFilter <DateFilter>] [-After <datetime>] [-Before <datetime>]
 [-Username <string>] [-PageNumber <int>] [-PageSize <int>] [<CommonParameters>]
```

### Description

Hent en eller flere logon forsøg. Optionally filter af brugernavn eller klokkeslæt periode. Hvis ingen dato filter er applied, logon forsøg fra sidste 7 dage er hentet. Resultater er paginated; som standard, henter en side af 10000 logon forsøg.

### Eksempler

#### Eksempel 1

```powershell
PS C:\> Get-DSLoginAttempt -Username 'johndoe'
```

Henter logon forsøg og filtre dem af brugernavn.

#### Eksempel 2

```powershell
PS C:\> Get-DSLoginAttempt -DateFilter Last30Days
```

Henter logon forsøg fra sidste 30 dage.

#### Eksempel 3

```powershell
PS C:\> Get-DSLoginAttempt -DateFilter Custom -After (Get-Date).AddDays(-14)
```

Henter logon forsøg fra sidste 14 dage ved hjælp af en brugerdefineret dato interval ('Før' standardværdien er til nu).

#### Eksempel 4

```powershell
PS C:\> Get-DSLoginAttempt -DateFilter Custom -After '2024-01-01' -Before '2024-01-31'
```

Henter logon forsøg for en specifik dato interval.

### Parametre

#### -After

Start dato for brugerdefineret dato interval (påkrævet når ved hjælp af -DateFilter Brugerdefineret).

```yaml
Type: System.Nullable`1[System.DateTime]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -Before

Slutning dato for brugerdefineret dato interval (brug med -DateFilter Brugerdefineret). Standardværdien er til aktuel dato/klokkeslæt hvis den ikke er angivet.

```yaml
Type: System.Nullable`1[System.DateTime]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -DateFilter

Dato filter for logon forsøg. Standardværdien er til sidste 7 dage hvis den ikke er angivet.

```yaml
Type: Devolutions.RemoteDesktopManager.DateFilter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -PageNumber

Side tal for paginated resultater. Standard: 1

```yaml
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -PageSize

Tal af resultater pr. side. Standard: 10000

```yaml
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -Username

Brugernavn at filtrere logon forsøg (klient-side filtering applied efter fetching fra server).

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Denne cmdlet understøtter de almindelige parametre: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction og -WarningVariable. Yderligere oplysninger finder De i [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

#### Devolutions.RemoteDesktopManager.Business.Entities.LoginAttemptEntity

### Noter

Yderligere oplysninger får De ved at skrive "Get-Help Get-DSLoginAttempt -detailed". Tekniske oplysninger får De ved at skrive "Get-Help Get-DSLoginAttempt -full".


---

# 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/da/powershell-commands/get-dsloginattempt.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.
