Skip to content
LucD notes

LucD notes

My PowerShell ramblings

  • Dives
  • VIProperties
  • SDK
  • Contact
Tweet

After the positive feedback on my Deep and Deep(er) Dives sessions at VMworld, I decided to start a “Dives” page.
The idea is to have short snippets of code, that show tips and tricks on how to improve your PowerCLI scripts.
Enjoy!

If you have any questions or suggestions for new Dives entries, feel free to use the Contact form.

Search the Dives by Keyword

  • Dives

Diagnostics

  • A VM memory dump

Error

  • Try-Catch and $_
  • Use Try-Catch

ESXi

  • Use Posh-SSH instead of PuTTY

Events

  • Foresee all OSCustomizationSpec events

Filter

  • Use the 'faster' methods
  • The case of the missing property

Invoke-VMScript

  • Here string and variable substitution
  • Here strings and the ExpandString method

Loops

  • Use lookup tables
  • Limit cmdlet calls in a loop

Running

  • Passing an array to background jobs
  • Running a background job

Selection

  • Table vs List

Speed

  • Find VM based on MAC

Statistics

  • Where do I find metrics?
  • Which cmdlets are available for performance statistics
  • What does Get-StatType do?
  • What is a Historical Interval

VM

  • Find allowed HW versions

VSC

  • VSC and PowerCLI's VimInventory and VimDatastore providers.

© Copyright 2023 LucD notes • Designed by MotoPress • Proudly Powered by WordPress