Skip to main content
Jamf Nation, hosted by Jamf, is a dynamic and knowledgeable community of Apple-focused IT admins and Jamf Pro users. Join us in person, in October, for the annual Jamf Nation User Conference (JNUC) to discover new and better ways to manage Apple devices.

Copy Device Hostname to Device's Location "Room" field.

Synopsis

Executing this script requires a username with access to the JSS API. Users can be given access by going to Settings->Accounts->Edit Account->API Privileges tab and granting permissions.

Before executing, update the script to include the correct JSS API username, JSS API password, and the JSS URL (without the trailing slash)

Description

This script copies an iOS device's hostname from the JSS and submits it into the device's inventory record under Location->Room. Organizations utilizing an Asset Tag can set the hostname of the device to the asset tag, then copy the hostname to the Location field for future searches, reporting, etc.

Download

Preview

Generating Preview...