WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Exploring new VCSA VAMI API w/PowerCLI: Part 3

Exploring new VCSA VAMI API w/PowerCLI: Part 3

01.26.2017 by William Lam // 5 Comments

In Part 3, we are going to look at auditing the different ways you can access the VCSA which includes direct console access (TTY1), Direct-Console UI (TTY2), whether the Bash Shell is enabled and remote SSH access. This is especially useful if you need to ensure certain interfaces like SSH is always disabled and you can even create scheduled task that would periodically run the PowerCLI script and generate either an email or some other notification when a particular access interface is enabled when it is not supposed to be.

VAMI UI Area of Focus

We will be retrieving the two access configurations properties shown in the VAMI UI today as well as two additional properties that are not displayed.

VAMI APIs Used

  • GET /appliance/access/consoleui
  • GET /appliance/access/dcui
  • GET /appliance/access/shell
  • GET /appliance/access/ssh

PowerCLI Function

  • Get-VAMIAccess

Sample Output


The output is fairly straight forward, just boolean specifying whether each of the access types are either enabled or disabled. To make changes to any of these settings, you just need to use the PUT operation against the specific access endpoint that you wish to enable or disable. I will leave that as an exercise for the reader.

  • Exploring new VCSA VAMI API w/PowerCLI: Part 1
  • Exploring new VCSA VAMI API w/PowerCLI: Part 2
  • Exploring new VCSA VAMI API w/PowerCLI: Part 3
  • Exploring new VCSA VAMI API w/PowerCLI: Part 4
  • Exploring new VCSA VAMI API w/PowerCLI: Part 5
  • Exploring new VCSA VAMI API w/PowerCLI: Part 6
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 10

More from my site

  • Exploring new VCSA VAMI API w/PowerCLI: Part 10
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 6

Categories // Automation, PowerCLI, vSphere 6.5 Tags // PowerCLI, vami, vcenter server appliance, vSphere 6.5

Comments

  1. *protectedKartiki Kale says

    09/08/2017 at 4:15 am

    Hey William,

    I have one doubt. As you know most of the thing about Vc.
    Could you please help with - "how to retrieve thumbprint of VCenter using command line or API"

    Thanks

    Reply
  2. *protectedEric says

    01/14/2018 at 12:52 am

    Hi William,

    Sorry but there are some 404 error when I try to download your module ... I have tried https://github.com/lamw/PowerCLI-Example-Scripts/blob/master/Modules/VAMI.psm1 & https://github.com/lamw/PowerCLI-Example-Scripts/blob/master/Modules/VAMI.psm1 ... It is the same ... Where can i download it ?

    Thanks for all your shares !

    Reply
    • William Lam says

      01/14/2018 at 5:52 am

      The original repo (which I don't own) had changed the module paths and hence the old URLs no longer work. Here's the new URL https://github.com/lamw/PowerCLI-Example-Scripts/blob/master/Modules/VAMI/VAMI.psm1

      Reply
  3. *protectedLong_lanh says

    02/26/2020 at 8:19 am

    Lam, look like all this command not working with 6.7 or something? I try this Get-VAMISUmmary on 6.7 the error ( the term is not recognized) is this each version of vcenter is different command?

    Reply
  4. *protectedMark says

    03/10/2021 at 10:54 am

    Hi William, In regard to the Get-VAMIAccess function, you indicate "The output is fairly straight forward, just boolean specifying whether each of the access types are either enabled or disabled. To make changes to any of these settings, you just need to use the PUT operation against the specific access endpoint that you wish to enable or disable. I will leave that as an exercise for the reader."
    While Get-VAMIAccess leverages Get-CISService, I can't figure out how PUT is leveraged to start / stop SSH. There is no Put-CISService command. Can you please provide an example on how to use the PUT command to manage access? Thank you!

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...