PowerCLI/Powershell: vCenter Slack Bot
An OVF from Opvizor that gets deployed to any VMware environment for powercli slack integration. Very simple deployment model.
Current Model:
- Appliance can currently only target one vCenter and one slack bot.
- Permissions are granted via account designated in OVF config.
- (read only recommended for obvious reasons)
- all commands requested via slack bot run in context of this account.
- Multiple appliances/vCenters can target one slack bot.
- (Ref.1 of two appliances/vcenter targeting one slack bot)
- Appliances can also be assigned to individually different slack bots.
- (Ref.2 of two different slack bots)
- Both models can be achieved by simply doubling up OVF deployments. One that targets a singular bot, while the other targets a default/catch-all bot.
- Utilizes powerclicore so, there are limitations to what powercli cmdlets can be utilized and same limits that powershellcore may have too.
References:
ref.1 |
ref.2 |
Links:
http://nolabnoparty.com/en/opbot-virtual-assistant-vmware-vsphere/ - Walkthrough for custom bots.
Neat Tidbit:
- Not yet in "Help", but there is a little neat 'alias' function.
- @yourbotname alias badvms=posh get-view -ViewType VirtualMachine -Filter @{'RunTime.ConnectionState'='disconnected|inaccessible|invalid|orphaned'} | select name
- @yourbotname badvms
- This will run your PowerCLI/Powershell line of code by simply passing your alias. (ref.3)
ref.3 |
Comments