#Powershell Magic Back once again with the Powershell 🥓 flavour
#Another book idea 💡

#Quick puppy update 🐶
As you know I had to get 3 of my puppies eyes tacked, well the two boys had both eyes done, but Frost the female only had one eye done, as the other eye was open and had no issues. However the day after the operation less than 24 hours, the eye that had not been tacked as it was fine was now closed up. Got back in contact with the vet who wanted to leave it for at least a month, due to the pup being so young and the dangers involved putting them under general anaesthetic. However after a week we went back to the vet for take 2 at this. Thankfully the pup went another round like the champ she is, and now has two fully open eyes. Frost is such a nice happy dog, no wonder the mrs wants to keep this one.

#The problem querying Nutanix 😕
So nothing comes as a surprise to me at work, and on this particular day I got informed that we had a 3rd party looking after Nutanix, which was news to me. However there was a problem that they could not gather all the VMs on the different Nutanix prism servers.
Okay well why was I suddenly being told this information? It transpired that the 3rd party company needed help in producing this list of VMs on each prism server. Again you would kind of think well surely this 3rd party would be able to cook up something to solve this issue, as surely they must have other customers or have had this issue before?
Yes, your right to think that, but it wouldn't be another amazing Powershell blog if this was not now my problem to solve. Let me get my costume ready...

However I am always happy when people ask me to do something, mainly it gives me that confidence boost that they are asking you because they know you are capable of anything and being able to cook up scripts to solve any given issue.
I promise you this time you will be getting more than two lines of Powershell code, this should hopefully open the doorway to using Powershell and APIs. Now unlike VM Ware, Nutanix have not in my opinon done a great job implementing a Powershell module to make this task easy-peasy. They do have a module, but this comes as an executable and well I personally could not get it working, it should have been a simple Install-Module but it turned into a mission to even be able to find the documentation, and the issues of it loading these as an executable and not getting it working, I turned to plan B. No that was not migrating the VM back to VM Ware where it is much easier to communicate with via a well designed Powershell module. No I went a different route, the only one I saw to be able to obtain the data requested
#The solution was to use the API 🕹️
So Nutanix has a half decent API documentation out there on their site, so this led to a bit of reading to understand how I could query this through Powershell and get the results this 3rd party company needed. After a bit of reading I cooked up the below script for them to run and produce the results.
#Boom job done 💥

After emailing the script to the 3rd party and informing how to run it, and showing a snippet of the output I got prior when I ran the script, I got the reply from the 3rd party that this was perfect and exactly what they wanted.
#Party time 🎹
Thanks to all the awesome people checking out my music on these blogs. This accounted for 33% of my traffic to youTube so that was great to see I got people checking out my blogs and checking out the music I am sharing. So please enjoy this thow-back with a 90s dance theme to it. Was really happy with this combined the two Roland Compacts I own to create this unique mix-up 🎵
Until next time stay safe and take care.

