> 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/fr/commandes-powershell/new-udradiogroup.md).

# New-UDRadioGroup

New-UDRadioGroup regroupe un ensemble de boutons New-UDRadio dans PowerShell Universal afin qu'une seule option du groupe puisse être sélectionnée à la fois.

### Synopsis

Crée un groupe de boutons radio.

### Syntaxe

```powershell
New-UDRadioGroup [[-Id] <String>] [[-Label] <String>] [[-Children] <ScriptBlock>] [[-OnChange] <Endpoint>] [[-Value] <String>] [[-ClassName] <String>] [[-DefaultValue] <String>] [-Disabled] [[-Sx] <Hashtable>] [[-Style] <Hashtable>] [<CommonParameters>]
```

### Description

Crée un groupe de boutons radio. Dans un groupe, un seul bouton radio pourra être sélectionné.

### Paramètres

#### -Id

L'ID du composant. Sa valeur par défaut est un GUID aléatoire.

```
Required?                    false
Position?                    1
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Label

L'étiquette à afficher pour ce groupe de boutons radio.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Children

Les boutons radio à inclure dans ce groupe.

```
Required?                    false
Position?                    3
Default value                {
                    New-UDRadio -Label "Option 1" -Value 1
                    New-UDRadio -Label "Option 2" -Value 2
                }
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnChange

Un bloc de script à appeler lorsque la sélection du groupe de boutons radio change. La variable $EventData inclura la valeur du bouton radio sélectionné.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Value

La valeur sélectionnée pour ce groupe de boutons radio.

```
Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

Une classe CSS à appliquer au groupe de boutons radio.

```
Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -DefaultValue

La valeur par défaut pour ce groupe de boutons radio.

```
Required?                    false
Position?                    7
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Disabled

Si le groupe de boutons radio est désactivé.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Sx

La propriété sx vous permet d'ajouter des styles personnalisés à votre composant.

```
Required?                    false
Position?                    8
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Style

La propriété style vous permet d'ajouter des styles personnalisés à votre composant.

```
Required?                    false
Position?                    9
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Paramètres communs

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

### Sorties

### Exemples

#### Exemple 1 : Groupe de boutons radio de base

```powershell
New-UDRadioGroup -Label 'group' -Id 'radio1' -Children {
   New-UDRadio -Value 'Adam' -Label 'Adam'  -Id 'adam'
   New-UDRadio -Value 'Sarah' -Label 'Sarah' -Id 'sarah'
   New-UDRadio -Value 'Austin' -Label 'Austin' -Id 'austin'
}
```

Crée un groupe de boutons radio de base avec trois boutons radio.

#### Exemple 2 : OnChange

```powershell
New-UDRadioGroup -Label 'group' -Id 'radio2' -Children {
   New-UDRadio -Value 'Adam' -Label 'Adam'  -Id 'adam'
   New-UDRadio -Value 'Sarah' -Label 'Sarah' -Id 'sarah'
   New-UDRadio -Value 'Austin' -Label 'Austin' -Id 'austin'
} -OnChange {
   Show-UDToast -Message "Radio selected: $EventData"
}
```

Crée un groupe de boutons radio de base avec trois boutons radio et un bloc de script OnChange.

#### Exemple 3 : Désactivé

```powershell
New-UDRadioGroup -Label 'group' -Id 'radio3' -Children {
   New-UDRadio -Value 'Adam' -Label 'Adam'  -Id 'adam'
   New-UDRadio -Value 'Sarah' -Label 'Sarah' -Id 'sarah'
   New-UDRadio -Value 'Austin' -Label 'Austin' -Id 'austin'
} -Disabled
```

Crée un groupe de boutons radio de base avec trois boutons radio et désactive le groupe.

#### Exemple 4 : Valeur par défaut

```powershell
New-UDRadioGroup -Label 'group' -Id 'radio4' -Children {
   New-UDRadio -Value 'Adam' -Label 'Adam'  -Id 'adam'
   New-UDRadio -Value 'Sarah' -Label 'Sarah' -Id 'sarah'
   New-UDRadio -Value 'Austin' -Label 'Austin' -Id 'austin'
} -DefaultValue 'Sarah'
```

Crée un groupe de boutons radio de base avec trois boutons radio et définit la valeur par défaut à « Sarah ».

#### Exemple 5 : Positionnement de l'étiquette

```powershell
New-UDRadioGroup -Label 'group' -Id 'radio4' -Children {
   New-UDRadio -Value 'Adam' -Label 'Adam'  -Id 'adam' -LabelPlacement 'start'
   New-UDRadio -Value 'Sarah' -Label 'Sarah' -Id 'sarah' -LabelPlacement 'start'
   New-UDRadio -Value 'Austin' -Label 'Austin' -Id 'austin' -LabelPlacement 'start'
} -DefaultValue 'Sarah'
```

Crée un groupe de boutons radio de base avec trois boutons radio et définit le positionnement de l'étiquette à « start ».


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/fr/commandes-powershell/new-udradiogroup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
