So this isn’t strictly a question, but I just had to rant about this somewhere. Feel free to delete this if needed.
The HP ILO cmdlets from HP found here:
are, in theory, useful for managing the out-of-band management interfaces (ilo) of HP servers. However, in trying to script around them and catch the error output I was getting nowhere. I look into the cmdlet code itself and what do I find? not a write-error or throw, but
WRITE-HOST “ERROR MESSAGE” -FOREGROUNDCOLOR RED
ARE YOU KIDDING ME HP?!?! REALLY?!?
Now I’m no expert programmer and maybe there’s a valid reason for doing this, but I can’t for the life of me think of what it could be. For anyone reading this, don’t ever do this, it makes the output completely useless for any kind of branching logic or anything. Use write-error. Also, if you are using these cmdlets be aware that the “error” output is anything but.