Excellent technology (thanks to VMware), good job (thanks to William) and great start point for community members like me.
I have released my version of VAMI (Virtual Appliance Management Interface) PowerCLi module.
There were two reasons for the module writing: overall module improvements and new functions.
Overall module improvements
- All functions support simultaneous connections to multiple vSphere Automation SDK servers within the same PowerCLi session. All returned objects contain
Connect-CisServer VCSA, PSC1, PSC2 Get-VAMISummary
- Some functions have been converted to advanced functions to support
Start-VAMIService -Name vsphere-client –Verbose Remove-VAMIUser lamw -Verbose -Confirm:$false
- All functions return objects only (no more
Write-Host). This allows to format or export an output from any function.
Get-VAMIStorageUsed | Format-Table –AutoSize Get-VAMIHealth | Export-Csv -NoTypeInformation .\Health.csv
- Pipeline supported for paired functions.
Get-VAMIService vsphere-client | Stop-VAMIService
-Onlineparameter navigates to appropriate article in the http://www.virtuallyghetto.com.
Get-Help Get-VAMITime -Online
- Some minor changes in
Param ()sections. For example,
Get-VAMIServicenow can accept multiple services in the
- Added some properties to returned objects in some functions. For example,
Usage%property in the
Get-VAMIService(like you see in the Web Client).
Get-VAMIStorageUsed | Get-Member Get-VAMIService | Get-Member -MemberType NoteProperty
Restart-VAMIServicefunction. Well, it was simple , but if we have
Stop-VAMIService– why could not we have
Restart-VAMIService? Now we have.
Get-VAMIService rbd,vsphere-client | Restart-VAMIService
Get-VAMIPerformance(CPU and Memory in VAMI UI). I will consider this function in more detail.
Connect-CisServer VCSA Get-VAMIPerformance
By default, the function returns CPU and Memory metrics for the last day and takes the samples every two hours.
This can be controlled by
-Interval parameters. The parameters are positional and Intellisense is supported as well.
Get-VAMIPerformance –Period Week –Interval DAY1 Get-VAMIPerformance Day HOURS6
Sometimes you will get zero metrics. There two reasons for this: either appliance was powered off awhile or a period, specified by
-Period parameter overlaps with a period before the appliance was deployed. The
-ExcludeZero switch will filter these metrics out from the report.
Get-VAMIPerformance –Period Quarter -ExcludeZero
And finally you can export a long period (three month) frequent report (get samples every five minutes) and analyze it in Excel later.
Get-VAMIPerformance Quarter MINUTES5 –ExcludeZero | Export-Csv –notype .\Perf.csv
If you are familiar with the Excel, there is no problem to build some graphs.
Your manager will like it .