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.
Amen to that. I have had the unfortunate “pleasure” of working with the iLO Cmdlets as well, and found the overall quality and consistency to be questionable at best.
Interesting approach with the monkey patching Dave