VMware {code} Community
mpwerner
Enthusiast
Enthusiast

VAMI API to stop / start VCSA services

Hi, Been trying to figure out how to use the VAMI REST API commands from PowerCLI to enable / disable VCSA access such as SSH, Bash, etc., via PowerCLI. Is there anyone that knows how to do this?

Thank you!

Reply
0 Kudos
1 Reply
doskiran
Enthusiast
Enthusiast

Please refer to this doc - https://developer.vmware.com/docs/vsphere-automation/latest/appliance/api/appliance/access/ssh/put/

PowerCLI Client SDK Example
# Module 'VMware.Sdk.vSphere.Appliance.Access'
$AccessSshSetRequestBody = Initialize-AccessSshSetRequestBody -Enabled $false
Invoke-SetAccessSsh -AccessSshSetRequestBody $AccessSshSetRequestBody

 

Reply
0 Kudos