> 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/it/comandi-powershell/new-udcard.md).

# New-UDCard

### Sinossi

Crea una nuova card.

### Sintassi

```powershell
New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Image <String>] [-Text <String>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]

    New-UDCard [-Id <String>] [-ClassName <String>] [-Header <Object>] [-Body <Object>] [-Expand <Object>] [-Footer <Object>] [-Media <Object>] [-Style <Hashtable>] [-Elevation <Int32>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]

    New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Content <ScriptBlock>] [-Image <String>] [-Raised] [-Avatar <Object>] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]
```

### Descrizione

Crea una nuova card. Le card sono utilizzate per visualizzare contenuti correlati.

### Parametri

#### -Id

L'ID del componente. Per impostazione predefinita è un GUID casuale.

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

#### -ClassName

Una classe CSS da assegnare a questa card.

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

#### -Header L'intestazione di questa card. L'intestazione contiene tipicamente un titolo per la card. Utilizzi New-UDCardHeader per creare un'intestazione.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Body Il corpo di questa card. Questo è il contenuto principale della card. Utilizzi New-UDCardHeader per creare un corpo.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Expand Il contenuto di espansione di questa card. Il contenuto di espansione viene mostrato quando l'utente fa clic sul pulsante di espansione. Utilizzi New-UDCardExpand per creare un'espansione.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Footer Il piè di pagina di questa card. I contenuti del piè di pagina contengono tipicamente azioni pertinenti alla card. Utilizzi New-UDCardFooter per creare un piè di pagina.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Media Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-StyleStili da applicare alla card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ElevationLa quantità di elevazione da fornire alla card. Maggiore è l'elevazione, più la card apparirà sollevata rispetto alla pagina.Required?                    falsePosition?                    namedDefault value                0Accept pipeline input?       falseAliasesAccept wildcard characters?  false-TitleUn titolo per la card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-TitleAlignmentL'allineamento del titolo.Required?                    falsePosition?                    namedDefault value                leftAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ContentIl contenuto della card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ImageUn'immagine da mostrare nella card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-TextRequired?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Raised \[\<SwitchParameter>]Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Avatar Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Sx Stile basato sul tema da applicare alla card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantRequired?                    falsePosition?                    namedDefault value                elevationAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnClickL'azione da eseguire quando si fa clic sulla card.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -RemoveMargin \[\<SwitchParameter>]Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Output--------------------------> ESEMPIO 1 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card1'Basic card|A basic card with a title and text.-------------------------- EXAMPLE 2 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card2' -Image '<https://picsum.photos/200/300>' -Style @{ width = '200px' }Card with image|A card with an image.-------------------------- EXAMPLE 3 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card3' -Elevation 10Card with elevation|A card with a higher elevation.-------------------------- EXAMPLE 4 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card4' -TitleAlignment centerTitle Alignment|A card with a centered title.-------------------------- EXAMPLE 5 --------------------------PS >New-UDCard -Text 'This is my card' -OnClick {PS >     Show-UDToast -Message 'You clicked the card'PS > } -Id 'card5'OnClick|A card with an OnClick event handler.-------------------------- EXAMPLE 6 --------------------------PS >$Header = New-UDCardHeader -Avatar (New-UDAvatar -Content { "R" } -Sx @{ backgroundColor = "#f44336" }) -Action (New-UDIconButton -Icon (New-UDIcon -Icon 'EllipsisVertical')) -Title 'Shrimp and Chorizo Paella' -SubHeader 'September 14, 2016';PS >     $Media = New-UDCardMedia -Image '<https://mui.com/static/images/cards/paella.jpg'PS> >     $Body = New-UDCardBody -Content {PS >         New-UDTypography -Text ' This impressive paella is a perfect party dish and a fun meal to cook together with your guests. Add 1 cup of frozen peas along with the mussels, if you like.' -Sx @{PS >             color = 'text.secondary'PS >         } -Variant body2PS >     }PS >     $Footer = New-UDCardFooter -Content {PS >         New-UDIconButton -Icon (New-UDIcon -Icon 'Heart')PS >         New-UDIconButton -Icon (New-UDIcon -Icon 'ShareAlt')PS >     }PS >     $Expand = New-UDCardExpand -Content {PS >         $Description = "Heat oil in a (14- to 16-inch) paella pan or a large, deep skillet over medium-high heat. Add chicken, shrimp and chorizo, and cook, stirring occasionally until lightly browned, 6 to 8 minutes. Transfer shrimp to a large plate and set aside, leaving chicken and chorizo in the pan. Add pimentón, bay leaves, garlic, tomatoes, onion, salt and pepper, and cook, stirring often until thickened and fragrant, about 10 minutes. Add saffron broth and remaining 4 1/2 cups chicken broth; bring to a boil."PS >         New-UDTypography -Text $DescriptionPS >     }PS >     New-UDCard -Header $Header -Media $Media -Body $Body -Footer $Footer -Expand $Expand -Sx @{PS >         maxWidth = 345PS >         border   = '2px solid #f0f2f5'PS >     } -Id 'card5'Complex Card|A card with all the features.-------------------------- EXAMPLE 7 --------------------------PS >$Expand = New-UDCardExpand -Content { "$(Get-Random)" } -DynamicPS > New-UDCard -Expand $Expand -Id 'card6'Dynamic Expand|A card with a dynamic expandable content. The content will be updated every time the card is expanded.


---

# 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/it/comandi-powershell/new-udcard.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.
