7. • 7 teams
• 2.5 Hours of coding
• 1 leader (Luc Dekens)
• 5 Members
• Networking
• Development
• Presentation
• Lot of fun
• Enough food and beer
VMware {code} Hackathon 2016
latraxa.cz
9. • Opensourced PowerShell => multiplatform PowerCLI
• Support for Linux
• Support for macOS
• Modules instead of Snap-ins
• Integrations of VS Code
• New cmdlets
VMware PowerCLI Core
latraxa.cz
10. • Minimal Linux OS (25 MB)
• Optimalized for the containers
• Integration to vSphere, API
• Updates by VMware
• Photon Controller for management
• Virtual Appliance ISO, OVA, AWS EC2,
Google, Azure
• https://github.com/vmware/photon/wiki
Photon OS 2.0
latraxa.cz
11. • INF8092 The Power Hour: Deep Dive DevOps and New Feaures of PowerCLI
• INF8255 Evolving the vSphere API for the Modern Era
• INF8430 vSphere 6.x Host Resource Deep Dive
• INF8038 Getting Started with PowerShell and PowerCLI in your VI
• INF9205 Troubleshooting vSphere 6 made Easy Expert Talk
Top 5 Sessions
latraxa.cz
13. ESXCLI
latraxa.cz
• ESXCLI features and new commands
https://code.vmware.com/doc/preview?id=4164
• Esxcli software vib command to patch ESXi
https://kb.vmware.com/s/article/2008939
15. • You can simply install PowerCLI from PS Gallery
• PSVersion Value of 5.0 or above is required
• Find-Module -Name VMware.PowerCLI
• Install-Module -Name VMware.PowerCLI –Scope CurrentUser –AllowClobber
• Get-Module VMware.PowerCLI -ListAvailable
• Upgrade:
• If you use Update-Module, the existing version of the module is not removed. To update a
module, you should first uninstall the existing version of the module and then install the
new version
• (Get-Module VMware.PowerCLI -ListAvailable).RequiredModules | Uninstall-Module –
Force
• Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module –Force
• And install it again, it will install current version
• Do not do this on the Mac, only PowerShell core and PowerCLI core is working now.
PowerCLI from PowerShell Gallery
latraxa.cz
16. • You can easily enable SSH on the ESXi host
• Connect-VIServer -Server 192.168.1.2 -User root -Password Heslo123
• get-vmhostservice | where {$_.Key -eq "TSM-SSH"} | Start-VMHostService
• All hosts in the cluster:
• Connect-VIServer -Server 192.168.1.3 -User <your account> -Password
<your password>
• Get-VMHost | foreach { get-vmhostservice -VMHost $_.name | where
{$_.Key -eq "TSM-SSH"} | Start-VMHostService}
• More usefull examples:
• https://github.com/vmware/PowerCLI-Example-Scripts
• Copy / Paste from community is good way to learn, then you can
contribute back
PowerCLI in the field
latraxa.cz
17. • HOL-1721-SDC-6 – vSphere Automation with PowerCLI
http://labs.hol.vmware.com
VMware Hands On Labs
latraxa.cz
18. • Datacenter Command-Line interface (DCLI)
• Works exclusively with vSphere Automation
API
• Supported on Windows and Linux
• As part of the vSphere Command-Line
Interface (vCLI)
• Interactive shell or via scripting mode
• Offline example:
• dcli +server vcsa.lab.local +skip-server-
verification +interactive
• https://blogs.vmware.com/vsphere/2016/12/
getting-started-datacenter-cli.html
DCLI in Action
latraxa.cz
19. • Python SDK for the VMware vSphere API that
allows you to manage ESXi and vCenter
• https://pypi.python.org/pypi/pyvmomi/
• https://github.com/vmware/pyvmomi-
community-samples
pyVmomi 6.5
latraxa.cz
24. • It saves you a lot of time
• They will love you
• You will get a lot more work, because of you can do that
Do not be afraid to start automate
latraxa.cz