I just wanted to post this small quick-cluster-connect script. Maybe its of use for anyone.
Usage
- Install the Nutanix CMDlets from the PRISM console in the Admin section.
- copy & paste the below code into a TXT file.
- Change the file extension to .PS1
- Edit the file and type in your Nutanix Cluster IP
- Run the script.
code:
# Quick Connect to Nutanix Cluster
# loading Nutanix PowerShell SnapIns
Add-PSSnapin NutanixCmdletsPSSnapin
# Cluster IP
$server = 'Your NTNX CLUSTER IP'
# Request & Verify credentials
$credentials = Get-Credential -Message "**Enter your Nutanix Admin credentials here**"
$username = $credentials.username
$password = ConvertTo-SecureString $($credentials.GetNetworkCredential().password) -AsPlainText -Force
write-host "Connecting to Cluster..."
Connect-NTNXCluster -Server $server -UserName $UserName -Password $password -AcceptInvalidSSLCerts -ForcedConnection
write-host "Done!"
HINT: If you have issues installing the CMDlets. I worte a post about that here.
Regards
Christian