Invoke the "Update Warranty" task from powershell
I would like to run the update as part of my runbook. So, I either need
1. A way to run the task from code, or
2. The code behind the task so I can use it.
Thanks
Best Answer
-
Eric_Krasner Customer Advanced IT Monkey ✭✭✭I would rather have the program calculate the Status and days left.
I am told that this update will happen nightly if I would just be patient.0
Answers
I am not aware of any way to invoke this from code as I have PowerShell code that does exactly the same as what you are describing and I assume waiting for the Asset Refresh cycle to kick in.
I'll be working on this same code over the coming weeks so if you would like to collaborate on this I'd be happy to see what we can achieve.
Send me a direct message if you want to get this happening, and when finished, we can share with the community.
I am just wrapping up pulling in warranty data from dell as well. The ContractStatus and DaysLeft fields on the Warranty object can be set in Orchestrator, so I just do some date arithmetic to find the days left (or 0 if past) and then some additional logic to set the string value of Contract Status to Warning, Expired or OK. I believe the calculation of warning is 10% of remaining time left or less, as set in Asset Management settings.
I believe you might have also asked a question before about how dell provides multiple warranties for a single item. What I did is to find the earliest start and latest end date for any entitlement, and then concatenate the details of each into the notes of a single warranty object that uses those earliest and latest dates. I excluded the ServiceLevelCode type of ‘DL’ as these seem to have a start and end date that is set to some min or max value.
Here is the Powershell Script, with some explanation of where I used Published Data, as that doesn’t translate well out of Orchestrator:
I am told that this update will happen nightly if I would just be patient.