Yet another role added to my Job description, Now I am managing our Virtual Servers. So true to form I’ve dived headfirst into powershell / powercli to see what I can do. Some of the posts coming up on this will likely be similar to others around the web as I reinvent the wheel while I learn. But you never know one of you might find me 1st or I might do it in a way that suits you better.
First up is a simple script to read data from an xml file and then update custom attributes on the vmhosts.
Custom Attributes Required:
AssetTag ServiceTag PurchaseDate WarantyExpires
Here is the xml format to copy
vmhost1 ABCD123 A12B3C4 2009-04-23 2012-04-23
Due to WordPress formatting issues I have removed the text in favour of a download.
Download script here: UpdateCustomAttr.ps1 (395)