Hudu Warranty Expiration Tracking

Kelvin from Cyberdrain has written a really useful PSWarranty module which allows warranty details to be looked up from vendors APIs and then update various sources. This week I got a pull request accepted which adds support for Hudu to it.

Setup

First you will need to add a field to your device asset layout which contains all your devices to track the warranty expiration date for. The primary_serial attribute must be set for these. This happens automatically for devices synchronised from RMMs. I would recommend adding a date field with expiration monitoring, however if you wish to import Apple devices you will need to make this a string (and won’t be able to track expirations) so I would recommend against this. Make a note of both the Asset Layout name and the Field name:

Next if you need to lookup Dell devices you will need to get an API Key from Dell. Instructions on how to do this can be found on the original blog from here: https://www.cyberdrain.com/automating-with-powershell-automating-warranty-information-reporting/

Next you will need an API key and your base domain for Hudu.

Finally check our the Readme to understand things the module is doing: https://github.com/KelvinTegelaar/PowerShellWarrantyReports

Once you have this information you can put together a simple script to call the module.

#### Hudu Settings ####
#Hudu API Key
$HuduAPIKey = "YourAPIKey"

# Set the base domain of your Hudu instance without a trailing /
$HuduBaseDomain = "https://your.hudu.domain"

#Asset Layout name for devices you wish to update-warrantyinfo
$HuduAssetLayout = "Desktops / Laptops"

# The name of the field where you wish Warranty data to be stored
$HuduWarrantyField = "Warranty Expiry"

########################
### Dell API Details ###
$DellClientID = "YourDellClientID"
$DellClientSecret = "YourDellSecret"
########################

#Get the Hudu API Module if not installed
if (Get-Module -ListAvailable -Name HuduAPI) {
		Import-Module HuduAPI 
	} else {
		Install-Module HuduAPI -Force
		Import-Module HuduAPI
	}

#Get PSWarranty API
if (Get-Module -ListAvailable -Name PSWarranty) {
		Import-Module PSWarranty 
	} else {
		Install-Module PSWarranty -Force
		Import-Module PSWarranty
	}
	
set-WarrantyAPIKeys -DellClientID $DellClientID -DellClientSecret $DellClientSecret

update-warrantyinfo -Hudu -HuduAPIKey $HuduAPIKey -HuduBaseURL $HuduBaseDomain -HuduDeviceAssetLayout $HuduAssetLayout -HuduWarrantyField $HuduWarrantyField -SyncWithSource -OverwriteWarranty -ExcludeApple

You may also like...