> 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/piattaforma/published-folders.md).

# Cartelle pubblicate

Le cartelle pubblicate consentono di condividere una cartella locale tramite il sito web di Universal. Qualsiasi file all'interno della cartella pubblicata è accessibile tramite una richiesta web. Questo è utile per archiviare immagini o altri file che desidera fornire tramite il suo Universal Dashboard.

## Pubblicare una cartella

Dalla pagina `Platform/ Published Folders`, può fare clic su Add Published Folder. Inserisca il percorso locale e il percorso della richiesta. Il percorso locale è la cartella che desidera pubblicare. Il percorso della richiesta è il percorso da cui l'utente finale richiede di scaricare i file della cartella.

Può attivare l'autenticazione e l'autorizzazione per la cartella.

<figure><img src="/files/ZCHcsccBfVtDcJ478Shn" alt=""><figcaption><p>Finestra di dialogo Published Folders</p></figcaption></figure>

Una volta pubblicata, la cartella compare nella tabella delle cartelle pubblicate.

<figure><img src="/files/ZyDE5oup4JhWvwNGymwb" alt=""><figcaption><p>Tabella delle cartelle pubblicate</p></figcaption></figure>

## Scaricare i file

Può scaricare i file presenti nella cartella pubblicata visitando il percorso della richiesta. Per proseguire con l'esempio precedente, potrei visitare il seguente URL per scaricare il file logo.png:

```http
http://localhost:5000/images/logo.png
```

Noti che le richieste non autenticate non possono accedere al file.

```powershell
PS C:\src\universal\src> invoke-webrequest http://localhost:5000/images/logo.png
Invoke-WebRequest: Response status code does not indicate success: 401 (Unauthorized).
```

## Documenti predefiniti

I documenti predefiniti consentono di caricare i file quando un utente specifica la cartella ma non il documento all'interno di una cartella. Questo è comodo quando un utente visita un URL come `/docs` ma non specifica `/docs/index.html`. Invece di restituire un 404, può restituire `index.html` quando l'utente specifica `/docs`.

Per configurare i documenti predefiniti, imposti il parametro `-DefaultDocument` su `New-PSUPublishedFolder`.

```powershell
New-PSUPublishedFolder -Path C:\website -RequestPath /docs -DefaultDocument @("index.hml")
```

## Impersonificazione

{% hint style="warning" %}
L'impersonificazione funziona solo quando si utilizza l'[autenticazione Windows](/powershell-universal/it/api/security.md#authenticating-with-windows-authentication).
{% endhint %}

Per impostazione predefinita, quando PSU accede ai file per servirli agli utenti, lo fa utilizzando lo stesso account di servizio del processo. Per accedere ai file come l'utente che sta scaricando il file, attivi l'impersonificazione.

```powershell
New-PSUPublishedFolder -Path C:\website -RequestPath /docs -DefaultDocument @("index.hml") -Impersonation
```

## API

* [New-PSUPublishedFolder](/powershell-universal/it/comandi-powershell/new-psupublishedfolder.md)


---

# 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/piattaforma/published-folders.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.
