WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • 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, VCSA 6.5, vSphere 6.5

Comments

  1. Kartiki 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. Eric 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. Long_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. Mark 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

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

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 © 2023

 

Loading Comments...