因此,我向监视人员提供了Nutanix帐户和PW,但它仍然出现相同的错误。
请指教。我必须在这里缺少一些东西。
最好的答案Thegman
查看原件$ header = @{“授权” =“ basic”+[system.convert] :: tobase64String([System.text.Encoding] :: utf8.getBytes($ username+“:”+$ password)}}}
foreach($集群中的$ cluster){
Connect -NutanixCluster -Server $ cluster -username $ username -password $ secpassword -Acceptinvalidsslcerts -forcedConnection |淘汰
$ pdlist = get-ntnxprotectiondomain |其中{$_。活动-eq $ true}
foreach($ pd in $ pdlist){
$ url =“ https://”+$ cluster+“:9440/prismgateway/services/rest/v1/v1/procection_domains/”+$ pd.name+“/schedule+”
尝试{$ 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