> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Device Names

> Set or change device names remotely from the Iru Endpoint web app. Rename Mac, iPhone, iPad, Apple TV, and Windows devices for easier identification.

<Callout icon="apple" color="#B84A7A" iconType="regular">This guide applies to Apple devices</Callout>

### About Device Naming

The Device Name Library Item helps IT administrators apply consistent naming conventions across Apple devices. It provides flexibility and control over device naming, making device management easier.

### How It Works

You can create standardized naming patterns using customizable formulas that include variables like asset tags, user names, blueprint names, company names, serial numbers, and custom text. The Device Name Library Item also manages device hostnames by replacing spaces with hyphens, ensuring compatibility with systems that rely on hostnames, like network security appliances.

<Note>
  This Library Item requires supervision.
</Note>

### Add a Device Name Library Item

To add this Library Item to your Iru Endpoint Library, follow the steps outlined in the [Library Overview](/en/endpoint/library/library-items-profiles/library-overview) article.

<Steps>
  <Step title="Name the Library Item">
    Give the new Device Name Library Item a **name**.
  </Step>

  <Step title="Assign to Blueprints">
    **Assign** to your desired Blueprints.
  </Step>
</Steps>

### Configure the Device Name Library Item

#### Device Name

<Steps>
  <Step title="Define Device Name Pattern">
    Drag variables in the Device name pattern field to define your desired pattern. Be mindful of platform-specific differences; for example, "Primary local user name" is only available for macOS.
  </Step>

  <Step title="Review Pattern Preview">
    Review the resulting pattern preview.
  </Step>
</Steps>

#### Hostname

By default, the Device Name Library Item will use the same pattern for the device name and hostname. Optionally, you can configure the Device Name Library Item to have separate device name and hostname patterns on Mac computers (allowing the device name to be more user-friendly).

<Steps>
  <Step title="Enable Custom Hostname">
    Select **Customize hostname**.
  </Step>

  <Step title="Define Hostname Pattern">
    Drag variables into the hostname pattern field to define your desired pattern.
  </Step>

  <Step title="Review Hostname Preview">
    Review the resulting pattern preview.
  </Step>
</Steps>

#### Hostname Considerations

* If you deselected Mac in the device families, the Hostname section will be disabled as MDM can only manage hostname on Mac. iOS, iPadOS, tvOS, and visionOS devices set their hostname automatically based on the Device Name.
* iOS, iPadOS, and visionOS devices connect to Wi-Fi networks with Private Wi-Fi Address turned on by default. With this setting turned on, the device does not share the hostname with the network. Instead, it shares the device's Model Name, e.g., iPad Pro 11 (4th Gen). You can turn this setting off using the Disable MAC address randomization configuration option in the [Wi-Fi Library Item](/en/endpoint/library/library-items-profiles/configure-the-wi-fi-library-item).

### Device Name Modification

<Steps>
  <Step title="Configure Name Protection">
    Optionally, to prevent users from modifying the device name or hostname, select the **Prevent users from modifying device name and hostname** checkbox.
  </Step>

  <Step title="Save Library Item">
    Click the **Save** button to save the Device Name Library Item to your Library.
  </Step>
</Steps>

* On iOS, iPadOS, tvOS, visionOS and macOS 14 Sonoma and later, this will set the Supervised restriction preventing users from modifying their device's name. On macOS versions prior to macOS 14 Sonoma, the Iru Agent will remediate device name and hostname changes after the next Agent check-in.

### Manually Rename a Device

macOS, iOS, iPadOS, tvOS, visionOS device names can be set directly on the associated device record page. This action will be unavailable if you have a Device Name Library Item set to configure the device's name. Manually renaming a device does not change the device hostname.

<Note>
  This Device Action requires supervision.
</Note>

<Steps>
  <Step title="Navigate to Device Record">
    Navigate to a device record.
  </Step>

  <Step title="Open Device Actions Menu">
    Click the **Device Action** menu in the upper right corner.
  </Step>

  <Step title="Select Set Device Name">
    Click **Set device name** from the action menu.
  </Step>

  <Step title="Enter Device Name">
    Enter a device name into the **Set Device Name** window.
  </Step>

  <Step title="Confirm Device Name">
    Click **Set Device Name**.
  </Step>
</Steps>
