Creating a Workspace ONE Sensor to Check Mac Warranty

Creating a Workspace ONE Sensor to Check Mac Warranty

Managing your organization’s IT assets efficiently includes keeping track of warranty information for devices such as Mac computers. Workspace ONE, a comprehensive, unified endpoint management (UEM) solution by VMware, allows you to create custom sensors to monitor various aspects of your endpoints, including warranty status. In this blog post, we’ll guide you through creating a Workspace ONE sensor to check the warranty status of Mac devices.

Prerequisites

Before we begin, ensure that you have the following prerequisites in place:

  1. Workspace ONE UEM Console: Access to the Workspace ONE UEM console with the necessary permissions to create sensors.
  2. Mac Serial Number: The serial number of the Mac computer for which you want to check the warranty status.

Step 1: Log In to Workspace ONE UEM Console

  1. Log in to your Workspace ONE UEM console using your administrator credentials.

Step 2: Create a New Sensor

2.1. Navigate to “Devices & Users” > “Sensors” in the Workspace ONE UEM console.

2.2. Click on the “+Add” button to create a new sensor.

Add Sensor

Step 3: Configure the Sensor

3.1. Give your sensor a descriptive name, such as “Mac Warranty Check.”

3.2. In the “Sensor Type” field, select “Script.”

3.3. In the “Script” field, enter the following script (Python script to check Mac warranty):

#!/bin/bash

currentUser=$(stat -f%Su /dev/console)
ACEplist="/Users/$currentUser/Library/Application Support/com.apple.NewDeviceOutreach/Warranty.plist"
if [ -f "$ACEplist" ];  then
  endDate=$(/usr/libexec/PlistBuddy -c "Print :coverageEndDate" "$ACEplist")
  date=$(date -j -f %s $endDate +%F)
  echo "$date"
else
  echo "Not Found"
fi

Step 4: Assign the Sensor to Mac Devices

4.1. After saving the sensor, go to “Devices & Users” > “Device List View” in the Workspace ONE UEM console.

4.2. Select the Mac devices you want to assign the sensor to.

4.3. Click on “Actions” and choose “More Actions” > “Sensors.”

4.4. select the “Mac Warranty Check” sensor from the list of available sensors.

4.5. Click “Save” to assign the sensor to the selected Mac devices.

Assign Sensor

Step 5: View Warranty Status

Now that you’ve assigned the sensor to Mac devices, it will run according to the configured frequency. To view the warranty status:

5.1. Navigate to “Devices & Users” > “Device List View.”

5.2. Select a Mac device from the list.

5.3. go to the “Sensors” tab in the device details.

5.4. You will see the “Mac Warranty Check” sensor listed with its status.

The sensor will regularly check the warranty status of the assigned Mac devices and provide updates in the Workspace ONE UEM console.

By following these steps, you can efficiently monitor the warranty status of Mac devices within your organization using Workspace ONE. This proactive approach to device management helps ensure that devices are under warranty, reducing the risk of unexpected repair costs and downtime.