• Stars
    star
    169
  • Rank 224,453 (Top 5 %)
  • Language
    PowerShell
  • License
    GNU Affero Genera...
  • Created over 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a repo dedicated to automatic warranty reporting and retrieval from different systems such as IT-Glue, Connectwise, Autotask, and N-central.

Automatic Warranty retrieval and reporting

See https://www.cyberdrain.com/automating-with-powershell-automating-warranty-information-reporting/ for more information.

This is a PowerShell module that helps you get warranty information for items in your CMDB, PSA, or RMM. This module was made due to some shady businesses going on in the world of Warranty reporting and lookups, and to democtratize the warranty lookups. :)

Installation instructions

This module has been published to the PowerShell Gallery. Use the following command to install:

install-module PSWarranty

Supported Platforms

The following platforms are supported. You can also use a CSV file as a source to generate reports. This won't sync back to the source though. Some APIs don't allow write-back, so those are only available to create reports.

An unchecked box means development for this is underway

PSA

  • Autotask
  • Connectwise Manage
  • Halo PSA / ITSM / Service Desk

Documentation Tools

  • IT-Glue
  • Hudu

RMM

  • Solarwinds N-Able (Reporting only)
  • NinjaOne
  • DattoRMM
  • BluetraitIO

Supported Manufacturers

  • Dell (Requires API key)
  • Microsoft
  • HP (New API)
  • Lenovo
  • Toshiba
  • Apple (Estimated dates)

Usage in products such as PSA or RMMs by vendors/non-MSPs

To use this product inside of your RMM, PSA, or other systems and you are not an MSP you must request a license or be an active sponsor of a specific tier.

Apple Note

Due to a change in how Apple generates serial numbers it is no longer possible to accurately determine the warranty expiry for newer devices. As such any new Apple devices could return a completely inaccurate expiry date. To account for this you can add the -ExcludeApple switch to the the Update-Warrantyinfo.ps1 script to skip updating any apple devices and ensure you do not update with inaccurate data.

Usage

Autotask

To execute an update of all devices in Autotask use:

$Creds = get-credential
update-warrantyinfo -Autotask -AutotaskCredentials $creds -AutotaskAPIKey 'APIINTEGRATIONKEY' -SyncWithSource -OverwriteWarranty

This script will then update all devices in Autotask with the date found in the APIs. If they date returned is invalid it will not update. If the date is already filled in, it will overwrite this.

To only generate HTML reports use

$Creds = get-credential
update-warrantyinfo -Autotask -AutotaskCredentials $creds -AutotaskAPIKey 'APIINTEGRATIONKEY' -GenerateReports

This will generate the reports in C:\Temp. To set the path yourself use

   update-warrantyinfo -Autotask -AutotaskCredentials $creds -AutotaskAPIKey 'APIINTEGRATIONKEY' -GenerateReports -ReportsLocation "C:\OtherFolder"

NinjaOne

To update NinjaOne first you will need to create a Global Custom Field to hold your expiry date. Call this something like "Warranty Expiry", use a Date type and make a note of the field name once saved. In my case it is warrantyExpiry. Next you need to generate Ninja API Credentials. Create a new "API Services" key with "Management" and "Monitoring" Access and Client Credentials as an allowed grant type. If needed enter "Localhost" in the redirect URL. For the NinjaURL enter the Ninja URL for your instance. For example https://app.ninjarmm.com, https://eu.ninjarmm.com, etc.

     update-warrantyinfo -Ninja -NinjaClientID "YourAPIClientID" -NinjaSecret "YourAPISecret" -NinjaURL "https://eu.ninjarmm.com" -NinjaFieldName "warrantyExpiry" -SyncWithSource -OverwriteWarranty -ExcludeApple

Hudu

To update Hudu, first edit the asset layout of the devices you wish to update to add a new field. If you wish to use expirations and not have apple devices, choose a date field and enable add to expirations. If you wish to have apple devices you will need to make this a string field and not use expirations. Make a note of the name of the field and the name of the asset layout then call the script:

    update-warrantyinfo -Hudu -HuduAPIKey "YourAPIKey" -HuduBaseURL "YourHuduDomain" -HuduDeviceAssetLayout "Desktops / Laptops" -HuduWarrantyField "Warranty Expiry" -SyncWithSource -OverwriteWarranty -ExcludeApple

Halo PSA / ITSM / Service Desk

To update Halo you will first need to determine which field name you are using to store you serial numbers. This could be a base field such as "inventory_number", an asset field such as "Serial Number" or a custom field such as "CFSerialNumber". You can find the name by using the Halo Powershell Module and using Get-HaloAsset -FullObjects and inpecting the returned objects:

    update-warrantyinfo -Halo -HaloClientID "YourAPIAppClientID" -HaloClientSecret "YourHaloAPIAppSecret" -HaloURL "YourHaloURL" -HaloSerialField "Halo Serial Field Name" -SyncWithSource -OverwriteWarranty -ExcludeApple

BluetraitIO

To execute an update of all devices in BluetraitIO use:

update-warrantyinfo -BluetraitIO -BTAPIKEY "your_api_key" -BTAPIURL "https://example.bluetrait.io/api/" -SyncWithSource -OverwriteWarranty

Contributions

Feel free to send pull requests or fill out issues when you encounter them. I'm also completely open to adding direct maintainers/contributors and working together! :) I'd love if we could make this into a huge help for our entire community.

Future plans

Version 1.7 includes a new HP API that is created from a reverse engineered API by HP.

More Repositories

1

CIPP

CIPP is a M365 multitenant management solution
JavaScript
791
star
2

RunAsUser

a PowerShell module that allows you to impersonate the currently logged on user, while running PowerShell.exe as system.
PowerShell
321
star
3

CIPP-API

PowerShell
201
star
4

AutomaticDocumentation

A repo dedicated to the Automatic Documentation blogs on CyberDrain.com
PowerShell
66
star
5

AutotaskAPI

Autotask 2020.2 REST API PowerShell wrapper
PowerShell
66
star
6

PSdrawIO

PowerShell
47
star
7

RMMIntuneHelper

PowerShell
29
star
8

AzAutomapper

Automatically mapping SharePoint sites in the OneDrive for Business client
PowerShell
26
star
9

PowerShellMonitoring

A repo dedicated to all PowerShell Monitoring blogs on cyberdrain.com
PowerShell
26
star
10

ITGlueBackup

A backup tool for the documentation system IT-Glue.
PowerShell
23
star
11

SecureAppModel

Scripts to create secure application model for Microsoft Partners to access delegated administration automation with scripts, while MFA is enabled.
PowerShell
21
star
12

Webinars

Webinar content
PowerShell
19
star
13

GPODeployment

Script to allow GPO deployment for non-domain joined environments or cloud only environments.
PowerShell
17
star
14

AzGlue

A forwarder for the IT-Glue API hosted in Azure, to secure and move around rate limitations by the IT-Glue API.
PowerShell
16
star
15

SecureScore

SecureScore module to allow easy downloading of the MS secure score
PowerShell
12
star
16

IntuneAutomation

A repo dedicated to automating intune tasks for delegated partners.
PowerShell
11
star
17

AzPwPush

PowerShell
11
star
18

ExchangeOnlineManagement.SAM

PowerShell
11
star
19

AzValidate

PowerShell
9
star
20

AzPam

JavaScript
8
star
21

O365AuditlogSearch

A script that assists in searchable auditlogs and downloading these on a schedule for O365.
PowerShell
7
star
22

KelvinTegelaar

Readme :)
7
star
23

AzNableProxy

PowerShell
7
star
24

O365Squat

PowerShell
7
star
25

TeamsCodeJoiner

PowerShell
5
star
26

AzureDeploy

4
star
27

AzWarrantyUpdate

PowerShell
4
star
28

CyberDrain

Central repo for all CyberDrain.com blogs.
4
star
29

AzDynaDNS

A dyndns managed DNS replacement within Azure.
PowerShell
3
star
30

FasterPartnerPortal

A faster Microsoft Partner Portal generated via PowerShell
PowerShell
3
star
31

AzFunctionExample

PowerShell
1
star