So I then provided the monitoring guys the nutanix account and pw and it still spits out the same error.
Please advise. I have to be missing something here.
Best answer by theGman
View originalBest answer by theGman
View original$Header = @{"Authorization" = "Basic "+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($username+":"+$password ))}
foreach ($Cluster in $Clusters) {
Connect-NutanixCluster -Server $cluster -UserName $username -Password $secpassword -AcceptInvalidSSLCerts -ForcedConnection | Out-Null
$pdlist = Get-NTNXProtectionDomain | Where {$_.Active -eq $true}
foreach ($pd in $pdlist) {
$URL = "https://"+$Cluster+":9440/PrismGateway/services/rest/v1/protection_domains/"+$pd.name+"/schedules"
try { $output = Invoke-RestMethod -Method Get -Uri $URL -Headers $Header -UseBasicParsing } catch { $output = '' }
/PrismGateway/services/rest/v1/
/PrismGateway/services/rest/v2.0/
/api/nutanix/v3/
https://:9440/PrismGateway/services/rest/v1/vms
https://:9440/PrismGateway/services/rest/v2.0/vms
https://:9440/api/nutanix/v3/vms
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.