> 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/fr/powershell-commands/new-dsaddomain.md).

# New-DSAdDomain

### Synopsis

Ajouter un domaine.

### Syntaxe

#### \_\_AllParameterSets

```
New-DSAdDomain -DomainName <string> -DisplayName <string> -AdministrationUsername <string>
 -AdministrationPassword <string> [-IsLDAPS] [-LDAPSCustomPort <int>] [-AutoCreateEnabled]
 [-DomainUsernameFormatType <DomainUsernameFormatType>] [-DomainUserReadOnly]
 [-DefaultVault <string>] [-AsLegacyResponse] [<CommonParameters>]
```

### Description

Ajouter un domaine avec les paramètres fournis. La licence Platinum Edition est requise pour activer la fonctionnalité Multi Domaine. Le compte d'administration fourni doit être en mesure de récupérer les informations des comptes utilisateurs et les appartenances aux groupes. Il peut nécessiter des privilèges plus élevés que ceux accordés aux membres du groupe intégré Active Directory Domain Users. Dans la plupart des cas, cela devrait être suffisant.

### Exemples

```powershell
PS C:\> New-DSAdDomain -DomainName domain.loc -DisplayName Dom -AdministrationUsername admin -AdministrationPassword "Pa$$w0rd!" -IsLDAPS -LDAPSCustomPort 1500 -AutoCreateEnabled -DomainUsernameFormatType NetBios -DomainUserReadOnly
```

Créer un nouveau domaine avec les paramètres fournis.

### Paramètres

#### -AdministrationPassword

Partie mot de passe des informations d'identification d'un compte de domaine ou de service permettant d'accéder à la forêt Active Directory et d'obtenir des informations sur les comptes utilisateurs via des requêtes LDAP.

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

#### -AdministrationUsername

Partie nom d'utilisateur des informations d'identification d'un compte de domaine ou de service permettant d'accéder à la forêt Active Directory et d'obtenir des informations sur les comptes utilisateurs via des requêtes LDAP.

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

#### -AsLegacyResponse

Dans les versions antérieures à 2024.2, de nombreuses cmdlets DS retournaient un objet ServerResponse. L'activation de ce commutateur de compatibilité ascendante permet aux scripts développés pour les versions antérieures de fonctionner correctement.

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

#### -AutoCreateEnabled

Créer automatiquement le compte utilisateur du domaine dans Devolutions Server lors de la première tentative de connexion.

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

#### -DefaultVault

Nom du coffre auquel l'utilisateur aura accès.

```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: ''
```

#### -DisplayName

Nom du domaine qui sera affiché dans l'application, notamment dans les messages d'information.

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

#### -DomainName

Nom de domaine de l'ordinateur distant.

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

#### -DomainUsernameFormatType

Sélectionner le format de nom d'utilisateur qui sera créé dans la base de données. UPN : l'utilisateur sera créé avec le format UPN, ex. : <bill@windjammer.loc>. NetBios : l'utilisateur sera créé avec le format NetBios, ex. : WINDJAMMER\bill. Username : l'utilisateur sera créé avec le nom de compte SAM.

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

#### -DomainUserReadOnly

Définir un utilisateur en lecture seule plutôt qu'un compte de type Utilisateur.

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

#### -IsLDAPS

Activer la communication LDAP over SSL.

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

#### -LDAPSCustomPort

Port de communication LDAPS. S'il n'est pas spécifié, le port par défaut sera utilisé.

```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: ''
```

#### CommonParameters

Cette cmdlet prend en charge les paramètres communs : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction et -WarningVariable. Pour plus d'informations, voir [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Notes

Pour plus d'informations, tapez « Get-Help New-DSAdDomain -detailed ». Pour les informations techniques, tapez « Get-Help New-DSAdDomain -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 dynamically by asking a question.

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

```
GET https://docs.devolutions.net/powershell/fr/powershell-commands/new-dsaddomain.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.
