December 08, 2023

Managing Dell PC Hardware Lifecycle Management with Workspace ONE Intelligence

Workspace ONE Sensors and Scripts combined with Workspace ONE Intelligence Dashboards and Reports are a very powerful and flexible toolset that can provide the visibility and reporting required to manage the hardware lifecycle of Dell PC devices. 

Workspace ONE provides multiple methods to deploy devices, from Drop Ship Online to Drop Ship Offline with an encrypted USB drive, as well as simply installing the Workspace ONE Intelligent Hub manually. Each process achieves the end goal of deploying the device and enrolling it into Workspace ONE for ongoing management.

Once the device is managed, how do we know when it is time to replace it? Some organizations have an asset management system to manage this. If you don’t, then we can use Workspace ONE Intelligence to report on important aspects of this task.

Most organizations replace desktop devices close to the expiry of the device’s hardware warranty. How do we get that information into Workspace ONE and leverage it for reporting and planning? Thanks to Workspace ONE Scripts and Sensors along with Workspace ONE Intelligence, it is relatively easy to get the warranty expiry date for Dell PCs and present in either a Dashboard or Report. Workspace ONE Intelligence also provides many ways to visualize the data and provide custom reporting to the respective team.

This solution is specific to Dell PCs and does require a Dell Tech Direct login and API key. If you don’t have a Dell Tech Direct logon, register for an account here -> https://tdm.dell.com/portal. If you have trouble, please speak with your Dell account manager or technical specialist.

Once you have the ApiKey and ApiSecret to make API calls to Dell Tech Direct, the solution requires the following to be deployed:

  • a Workspace ONE Script (get_dellwarranty.ps1) with the two variables (ApiKey and ApiSecret) to make the API call and write the data to a registry key,
  • a Workspace ONE Sensor (get_daysuntildellwarrantyexpires.ps1) to report the number of days until the device’s warranty expires,
  • a Workspace ONE Sensor (get_dellmodel.ps1) to report the model type,
  • a Workspace ONE Intelligence Dashboard to display the number days until expiry by the number of devices, by model.

Example Dashboard

Before walking through each of the four components, let’s take a look at the output. The following example Workspace ONE Intelligence Dashboard utilizes the two sensors mentioned previously to report the device’s model type and the number of days until the warranty expires, for devices that are expiring within 90 days from today and have checked in within 30 days from today. We added these two criteria as filters so that we get current data, and we only view devices that we need to deal with in the immediate timeframe.

It is important to note, that the Dashboard and get_daysuntildellwarrantyexpires.ps1 sensor both support and report on negative days. So, if the warranty has already expired—no problem, you will still see it in this Dashboard.

Click View on Dell Devices report

get_dellwarranty.ps1 Script

This script leverages two variables – ApiKey and ApiSecret, to connect to Dell Tech Direct and then write relevant information about that device to the registry. When deploying the script via Workspace ONE Scripts, you can provide these variables so that you don’t need to modify the script. Simply create a variable call ApiKey and provide your Dell Tech Direct API Key, then create a second variable called ApiSecret and once again provide your Dell Tech Direct API secret. Workspace ONE Scripts will automatically create an environment variable in the current session for each variable, which are referenced in the script as $env:ApiKey and $env:ApiSecret respectively.

The API call uses the device serial number to search the Dell Warranty database and return the following values:

  • WarrantyStartDate
  • WarrantyEndDate
  • ServiceLevelDescription
  • ServiceLevelCode
  • ServiceLevelGroup
  • Model
  • OriginalShipDate
  • ServiceTag

These values are all written to the HKLM:\SOFTWARE\DELL\WARRANTY registry key and will be read by the two abovementioned sensors. This allows us to deploy and run the script once. It does not need to run on a schedule basis as the data never changes.

To create the script, from within the Workspace ONE UEM Console, select RESOURCES > Scripts > Add > Windows:

  1. Provide a name (use the name of the script file).
  2. Provide a description (can be the script header).
  3. Leave the Deployment parameters default.
  4. Paste in the code.
  5. Click Next.
  6. Type “ApiKey” for the Key and your actual API key for the value.
  7. Click Add to add the second variable “ApiSecret” into the second Key field and your actual API secret for the value.
  8. Click Save.
  9. Select your new Script and select Assign > NEW ASSIGNMENT.
  10. Provide a name for the assignment.
  11. Start typing to select the appropriate Smart Group > click Next.
  12. Select Run Once Immediately in the Deployment Triggers > Add.
  13. Click Save and Publish.

When assigning the script, target Windows devices only. It is not necessary to specify just Dell devices as the script will exit from non-Dell devices, not make the API call to Dell Tech Direct and not write to the registry.

Sensors

Two Workspace ONE Sensors are also deployed to read the above data:

get_daysuntildellwarrantyexpires.ps1 returns the number of days until the device warranty expires from the WarrantyEndDate recorded in the registry key described previously. The calculation is from the date of the last sensor run and can be positive or negative - how many days until the device warranty expires, or how many days since the device warranty expired.

get_dellmodel.ps1 returns the Dell model from the from the Model registry key.

If you would like additional values such as the original shipping date, copy the get_dellmodel.ps1 sensor and change the $value variable to “OriginalShipDate”.

To create each sensor, from within the Workspace ONE UEM Console, select RESOURCES > Sensors > Add > Windows:

  1. Provide a name (use the name of the script file).
  2. Provide a description (can be the script header).
  3. Set the Deployment parameters paying attention to the Response Data Type (called Return Type: in the script header).
  4. Paste in the code.
  5. Click Save and Assign.

When assigning the sensors, target Windows devices. It is not necessary to specify just Dell devices as the sensor will only report from devices that report as Dell and have the registry keys created by the get_dellwarranty.ps1 script. All non-Dell devices will report NULL. We also suggest that to set the Deployment Trigger as Event and either Login or Startup.

Dashboard

Creating the Dashboard to visualize these values is very simple and quick. From within the Workspace ONE Intelligence Console > click Dashboards > create a new Dashboard or select an existing one:

  1. Click ADD WIDGET.
  2. Provide a Name and Description.
  3. Select Workspace ONE UEM > Device Sensors from Available Data Sources.
  4. Select Donut as Chart Type, Count of Workspace ONE UEM Device GUID as Measure.
  5. Group by get_dellmodel and subgroup by get_daysuntildellwarrantyexpires.
  6. Add the following filters:
    1. Last Sync Time WITHIN Last 28 day(s),
    2. AND get_daysuntildellwarrantyexpires LESS THAN OR EQUAL TO (90),
    3. Click Save.

This creates a nice simple dashboard that can be drilled down into. Either click a device model type to see the devices filtered by the selected model type or click the VIEW link in the bottom left corner to see all devices matching the main filter.

Dell devices end of warranty

 

Clicking on View will show the donut chart again as well as a table of data, where you can edit which columns are displayed.

Donut chart Dell Devices

Adding the following columns using sensors helps provide additional context to the data:

  • get_device_hostname, 
  • dell_end_of_warranty_date, 
  • dell_warranty_end_days,
  • get_device_model, and
  • Last Sync Time.

 

Report available for download in Workspace ONE Intelligence

Click REPORT in the top right corner of the Dashboard to create an exportable and sortable table to share with the appropriate teams. Clicking the REPORT will automatically select the appropriate data source, grouping, filters and columns.

Click Downloads and download the latest report. You can then sort using the dell_warranty_end_days column (smallest to largest) to see which devices need immediate attention.

Excel report for Dell Devices end of warranty

In Summary

Workspace ONE Sensors and Scripts combined with Workspace ONE Intelligence Dashboards and Reports are a very powerful and flexible toolset that can provide the visibility and reporting required to manage the hardware lifecycle of Dell PC devices.

Used with the hardware manufacturer’s own data, an administrator or asset manager can determine which devices require replacement based upon the warranty end date. These same Dashboards and Reports can be duplicated or modified to provide additional insights such as warranty service level, or the original shipping date with some minor tweaks.

For more information on how to achieve this, see Getting Started with Workspace ONE Intelligence Reports and Dashboards: Workspace ONE Operational Tutorial.

Resources

Filter Tags

Workspace ONE Workspace ONE Intelligence Blog Announcement Intermediate Manage