Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Connect using the Rest API

$
0
0

This worked for me!

 

 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

 

$Credentials = @{

    username = 'domain\username'

    password = 'mypassword'

}

 

$Server = "av1.domain.local"

 

Invoke-RestMethod -SessionVariable ServerSession -Method Post -Uri "https://$Server/cv_api/sessions" -Body $Credentials

 

 

What resolved it was the first line.


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>