Skip to content
VMware PowerCLI 101 at VMworld US 2019 - HBI1743BU
PowerShell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
0 - Setup.ps1
1 - Intro.ps1
2 - VM snapshots.ps1
3 - VM tags.ps1
4 - VM creation date.ps1
5 - Extras.ps1
LICENSE
README.md

README.md

Blog post: VMware PowerCLI 101

At VMworld US 2019, Brian Bunke and Kyle Ruddy presented session HBI1743BU - "Introduction to PowerCLI." It was intended for those new to PowerShell and/or PowerCLI to see it in action -- hopefully making the command line a little more familiar -- and to provide a permanent "how to get started" example via recorded video and this code repository.

Demo Files

  • 0 - Setup.ps1
    • Get/update PowerCLI; connect to vCenter; perform optional one-time setup tasks
  • 1 - Intro.ps1
    • Discover infrastructure; use the pipeline and a variable; display other object properties
  • 2 - VM snapshots.ps1
    • Discoverability in PowerShell; find and remove old VM snapshots
  • 3 - VM tags.ps1
    • Tag lifecycle: create, read, update, delete ("CRUD" operations)
  • 4 - VM creation date.ps1
    • Explore the ExtensionData property to view a new vSphere 6.7 feature
  • 5 - Extras.ps1
    • Some code examples of ideas we introduced but didn't have time to cover during the session:
      • Get VM by MAC address
      • Find VMs with connected media drives
      • Data manipulation and reporting
      • Compare host DNS/NTP entries
      • Check the "Upgrade VMware Tools before each power on" box on all VMs

Links

Basic PowerShell and PowerCLI Info

VMware Hands-on Labs (HOL)

PowerCLI Community

You can’t perform that action at this time.