Asset Management how to set Hardware warranty period from PowerShell
I'm attempting to update our hardware asset information based on an excel from our vendor. It identifies for every item we purchased over the years the Serial Number and a few other columns, such as the warranty start and end dates.
I noticed that I can manually update an item to point to the correct catalog item, but the start and end dates for the warranty are greyed out. I first need to create a warranty object. How does this work ? Our material has a standard 3 year warranty based on the Delivery date.
Another question is, how can I go over the excel in PowerShell, find the Hardware Asset with a matching Serial Number, and then update the Catalog Item and other fields ?
This is all new to me, so I may be going about this in a totally wrong way ?
Answers
https://support.cireson.com/KnowledgeBase/View/55#/
https://support.cireson.com/KnowledgeBase/View/19#/
First - probably the most overused analogy, but one I'm still going to use is that everything in SCSM comes down to cookie cutters and cookies...or rather Classes and Objects respectively. So there is the Cireson Asset Management Warranty class, Hardware Asset class, Catalog Item class, etc. etc. Those classes are really a definition of sorts, so that every object you stamp out generally looks the same but still is unique in its own way. Based on this SCSM architecture + how Cireson has built out Asset Management you're correct in that you would need a Warranty object and then relate it to a Hardware Asset.
The reason behind this more than likely is that you may relate a Warranty to one or many Hardware Assets. You may update this warranty independently of the Hardware Assets. So if anything, this is really done from a saving some administrative overhead in SCSM. That said, there certainly is some setup time as you're no doubt experiencing but it's setup time and setup time alone.
Second - PowerShell over Excel. You can do it, but a CSV is far simpler. Not only because PowerShell features the native "Import-CSV" cmd-let but because if its a CSV you can use the Cireson Asset Import Connector to read that CSV and create objects of a particular class.
Last - I could just be misreading it, but it sounds like you may be missing how Catalog Items and Hardware Assets play together. In short it's another "cookie cutter" style analogy, but in practice your Catalog Items are things like "Cisco RV325". The Catalog Item is nothing more than a record of "I have this thing in my environment" within SCSM. The Hardware Asset is each individual instance of that thing within your environment. So you'd have a single Catalog Item related to one or many Hardware Assets. With this said, part of Cireson Asset Management is to automatically related Hardware Assets to Catalog Items one some defined schedule based on a like make/model. But I will say that this built in Cireson workflow only works against Computer objects, you'd have to create custom workflows to manage other Configuration Items in your environment for the automatic matching to work. Here's an example of one such custom script.
I think the best advice to offer around Asset Management within SCSM if you're going at it alone or in a small team, is to focus on getting objects loaded first, then move on to how they relate to one another. Oh and in dev
SvcTag (serial number), Model, Warranty Start Date, Warranty End Date
What I want to do is to go over this csv in PowerShell, and for each item that has a corresponding item in my CMDB - meaning a computer with the same serial number - I want to update the Warranty Start Date and Warranty End Date. I don't want to create or update computers that are not already in the CMDB as these would be machines that are no longer active and probably decommissioned some time ago (as reported by SCCM).
Makes sense ?
Now you'll have to update the $warrantyPropHash, but this I think is the general idea of what you're after.
You could modify it to instead of create new warranty object, just relate them. All it would take is defining the static warranty object outside of the loop and then relating within the loop.
Thanks for your assistance
Stephane
I'd like to show the Warranty End Date in the All Hardware Assets overview.