Fool’s Gold and the Execute PowerShell Command task

Over the last week, I’ve been banging my head against the wall trying to figure out how to exactly approach the usage of this task in UCS Director.  On the one hand, it works rather well.  On the other hand, it’s nearly impossible to roll back the changes in which this task performs.  This is mostly due to the inability to pass variables back and forth between the task and UCS Director.

This is why I’m calling this task a “Fool’s Gold Task”.  It’s unfortunate that I’ve gotten to the point where I’m pretty strong in my PowerShell abilities, but now I may have to force myself to learn the JavaScript implementation for UCS Director just to be able to manipulate these tasks the way I want them.

I knew going into this that I’d have some issues with UCS Central due to the lack of built-in tasks in Director.  I made it work, but unfortunately, I still have to manually clean up what my script does in creating a boot policy in UCS Central.  The boot policy is central to allowing that blade to boot up properly to the SAN LUN I allocate and zone for that host.  When I’m rolling back the entire server, I want all that information gone.  Unfortunately, as I stated before, it’s a manual clean up afterwards since the boot policy was created by the PowerShell script, but none of the information about what was done was passed to UCS Director for proper cleanup.

I’ve put in a word with some of my contacts related to UCS Director at Cisco.  I hope there could be some sort of ability to provide a rollback script section, similar to the way the Execute Network CLI task functions. At least at a minimum, it would provide the ability to rollback the changes done by some of the PowerShell scripts.

While I’m also asking for things, I’m going to ask for the ability to pass variables back and forth between the Execute PowerShell task and UCS Director.  I might have a better time asking for unicorn bacon, but at least it would be nice to have a more simplified way to allowing for this to happen (especially for those of us that seem to be awfully dumb towards JavaScript).

*** EDIT – I edited this post because I was able to finally find the UCS Director task related to connecting an ESX host to a distributed virtual switch.  One of these years, I’m going to remember all the tasks that are available in the UCS Director task library.  However, my point about what I had to do to get UCS Central components configured through PowerShell is still valid.


About snoopj

vExpert 2014/2015/2016/2017, Cisco Champion 2015/2016/2017, NetApp United 2017. Virtualization and data center enthusiast. Working too long and too hard in the technology field since college graduation in 2000.
This entry was posted in Technical and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s