Pick the right management tool for you or the situation
Do You Manage Any Of These Technologies?
Write your own script or function help, for you or someone else They will thank you, and you will be pleased one day that you did it too
Digitally Sign Your Scripts Save time and costly mistakes by helping prevent unauthorised changes Most IDEs will sign the script for you
Be Green, Create Advanced Functions as Reusable Code
Advanced Functions - Features
Add –Confirm, -WhatIfcapabilities
Mandatory, Parameter Sets, Accept Pipeline Input, Help Message, Validation
Advanced Functions - Demo
Competition Time – PowerCLI Book Giveaway Where is PowerCLI Guru Alan Renouf originally from?
Modules Make Distributing Your Code Easier VS
What is a PowerShell Module? A collection of files containing functions, scripts etc and possibly other files such as the manifest to make it more professional Stored within a folder as a subfolder of the Modules location. Can be found via $env:PSModulePath Contents made accessible to the user via the Import-Module cmdlet
Why Bother with a PowerShell Module? Makes sharing of groups of functions and scripts easy Simple XCOPY style deployment of the module folder either internally or publishing to an external website Make your commonly used functions available to yourself without ‘Profile Bloat’ – they are available as and when you need them from a module
Make Your First Module Create two functions Save them into a *.psm1 file to the module folder Import them for use into your session Go!
Make Your First Module - Demo
PowerCLIBook Module - Demo
If you borrow it, make sure you test it! Share back your own scripts / solutions. You know how good it was when you found something useful, give someone else that same experience.
Good places to start borrowing Virtu-Al.net LucD.info VMware PowerCLI Community Site
PowerGUI VMware PowerPack
Use in combination with VMware Community PowerPack to kick start your PowerCLI scripting
PowerGUI Quick Overview
Automate Deployment of ESXi At a minimum use PowerCLI to create a standard host config For bonus points use additional technologies to automate further: