# 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="https://744643921-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJO9NLelA0RS8JB4i9oaQ%2Fuploads%2FWjXhK9d2gYP5qNHmTPYP%2Fimage.png?alt=media&#x26;token=a1d6fc58-dfac-42ed-831b-1420fe8501fe" 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.
