From 358337db74693a1c9d7ea4c668482b6af8325c44 Mon Sep 17 00:00:00 2001 From: William Lam Date: Thu, 26 Jan 2017 06:25:56 -0800 Subject: [PATCH] Adding Get-VAMIAccess function --- Modules/VAMI.psm1 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) mode change 100644 => 100755 Modules/VAMI.psm1 diff --git a/Modules/VAMI.psm1 b/Modules/VAMI.psm1 old mode 100644 new mode 100755 index 6c8c835..3272e6d --- a/Modules/VAMI.psm1 +++ b/Modules/VAMI.psm1 @@ -83,3 +83,36 @@ Function Get-VAMIHealth { $healthResult } + +Function Get-VAMIAccess { +<# + .NOTES + =========================================================================== + Created by: William Lam + Date: Jan 25, 2016 + Organization: VMware + Blog: www.virtuallyghetto.com + Twitter: @lamw + =========================================================================== + .SYNOPSIS + This function retrieves access information from VAMI interface (5480) + for a VCSA node which can be an Embedded VCSA, External PSC or External VCSA. + .DESCRIPTION + Function to return VAMI access interfaces (Console,DCUI,Bash Shell & SSH) + .EXAMPLE + Connect-CisServer -Server 192.168.1.51 -User administrator@vsphere.local -Password VMware1! + Get-VAMIAccess +#> + $consoleAccess = (Get-CisService -Name 'com.vmware.appliance.access.consolecli').get() + $dcuiAccess = (Get-CisService -Name 'com.vmware.appliance.access.dcui').get() + $shellAccess = (Get-CisService -Name 'com.vmware.appliance.access.shell').get() + $sshAccess = (Get-CisService -Name 'com.vmware.appliance.access.ssh').get() + + $accessResult = "" | Select Console, DCUI, BashShell, SSH + $accessResult.Console = $consoleAccess + $accessResult.DCUI = $dcuiAccess + $accessResult.BashShell = $shellAccess.enabled + $accessResult.SSH = $sshAccess + + $accessResult +} \ No newline at end of file