# Performing media-based deployments

{% hint style="info" %}
Applies to: DeployR 1.1
{% endhint %}

While PXE booting is typically the recommended approach for initiating a bare metal task sequence, DeployR 1.1 also adds the ability to generate media.  This media operates in two separate modes:

* Standalone.  All the metadata (task sequences, content items) and content items (boot images, operating systems, apps, scripts, etc.) are included on the media.  When booting from the media, no communication with the DeployR server is needed, so no authentication will be performed.  If a task sequence needs content that is not on the media, the task sequence will fail.  Steps that require communication with the DeployR server or cloud services (Offline domain join, Autopilot registration, cloud OSes, cloud driver packs, etc.) will fail.
* Caching.  The task sequence metadata and a selection of content items will be included on the media.  When booting from the media, it will authenticate with the DeployR server, so any content not available on the media can be downloaded from the DeployR server.  All steps will work, even those that need to communicate with the DeployR server.

The behavior of the media being generated is controlled by specifying a "Media" setting in the Bootstrap.json file in the "C:\Program Files\2Pint Software\DeployR\Client" folder.  An example:

```json
{
    "Variables": {
        "DeployRHost": "https://deployr.contosomn.com:7281",
        "Debug": "true",
        "ProgressTimeout": "120",
        "Media": "Caching",
        "KeyboardLayoutPE": "0000041d"
    }
}
```

To generate the media, log onto the DeployR server and open a PowerShell 7 session.  From there, import the DeployR.Utility PowerShell module and authenticate with the DeployR server:

```powershell
Import-Module "C:\Program Files\2Pint Software\DeployR\Client\PSModules\DeployR.Utility"
Connect-DeployR -Passcode "DeployR"
```

Then you can run the "New-DeployRMedia" cmdlet.  WIth no parameters, it will show a list of all the available removable USB devices that can be used:

<figure><img src="/files/1zZHZXHHGXQu0MnAyMLX" alt=""><figcaption></figcaption></figure>

To create the actual media, specify the disk number ("2" from the above example).  Optionally, specify one or more tags that should be used to filter the items that will be included on the media; the default is all items.

```powershell
New-DeployRMedia -DiskIndex 2 -Tags Media
```

This is a destructive operation: the specified USB volume will be reformatted into two partitions, with boot files on a FAT32 partition and all other content placed on an NTFS partition (needed to support files larger than 4GB).  Depending on the amount of content selected, this can take some time to complete.  Once it is done, you can eject the USB device from the server and use it to boot a client device.

For virtual machines, you can also create an ISO. &#x20;

```powershell
New-DeployRMedia -ISOPath C:\Media.iso -Tags Media
```

Once created, this can be attached to a virtual machine and be used to boot the device.


---

# Agent Instructions: 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://documentation.2pintsoftware.com/deployr/performing-media-based-deployments.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.
