5 Essential Tips for Maximizing Your Experience at Nutanix .NEXT for Bloggers
Hi. We have a large grouping of VM's that are not always required to be running and would like to find a way to shutdown these particular VM's on a sunday night. Now anyone know how to find a group of VM's (either via label, project, category etc) and pass a shutdown command. Ideally I would like to do this via PowerShell but I will take anything.
I've written a PoSH script which does the following. [list=1] [*]Authenticates to Prism Central V3 API [*]Calls /category/query API to get a list of VM uuid's that are members of the PROD category. [*]Write this list of uuid's to a string [*]Connect to the NTNX cluster using Nutanix PowerShell cmdlets. [*]Iterate through the above string and execute Set-NTNXVMPowerState against the uuid's. [/list] Steps 1 - 4 work as expected. Step 5 seems to iterate through the list as it should but when I put in the Set-NTNXVMPowerState command to be executed, it throws an access denied error. Once the script gives the error, the powershell connection looks like it locks the account and you cannot execute any commands. If I comment out the foreach loop, and just execute a normal PoSH cmdlet (after the Connect-NTNXCluster) such as Get-NTNXClusterInfo, it works fine. I have tried both my account (which has Prism admin rights) and the Prism Central admin account with no luck. So 2 q
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.