A PoshBot plugin that brings common VMware PowerCLI operations into a ChatOps workflow.
The module was built to make routine snapshot work accessible from a team chat while keeping vCenter credentials encrypted on the PowerShell host. It is retained as an example of connecting operational automation, credential handling, and a human collaboration interface.
- Store vCenter credentials in an encrypted local configuration.
- Run permission-gated PowerCLI operations through a PoshBot command.
- Get, create, and remove snapshots for one or more virtual machines.
The generic !powercli command evaluates administrator-supplied PowerShell.
Restrict its vmwarepluginadmin permission to trusted operators. Snapshot
commands use the narrower snapshot permission.
Install-Module -Name PoshBot.VMware -Repository PSGallery
&("$(Split-Path (Get-Module PoshBot.VMware -ListAvailable).Path -Parent)\\Set-VIServer.ps1")PowerCLI must already be installed on the PowerShell host.
!install-plugin -name poshbot.vmware
The vCenter connection is configured from PowerShell rather than from chat.
!getsnapshot vm1 'vm2' 'vm 3'
!newsnapshot vm1 'vm2' 'vm 3'
!removesnapshot vm1 'vm2' 'vm 3'
Please report problems through GitHub Issues.