Book Image

PowerCLI Essentials

By : Chris Halverson
Book Image

PowerCLI Essentials

By: Chris Halverson

Overview of this book

Have you ever wished you could automatically get a report with all the relevant information about your VMware environments in exactly the format you want? Or that you could automate a crucial task that needs to be performed on a regular basis? Powerful Command Line Interface (PowerCLI) scripts do all these things and much more for VMware environments. PowerCLI is a command-line interface tool used to automate VMware vSphere environments. It is used to handle complicated administration tasks through use of various cmdlets and scripts, which are designed to handle certain aspects of VSphere servers and to help you manage them. This book will show you the intricacies of PowerCLI through real-life examples so that you can discover the art of PowerCLI scripting. At the start, you will be taught to download and install PowerCLI and will learn about the different versions of it. Moving further, you will be introduced to the GUI of PowerCLI and will find out how to develop single line scripts to duplicate running tasks, produce simple reports, and simplify administration. Next, you will learn about the methods available to get information remotely. Towards the end, you will be taught to set up orchestrator and build workflows in PowerShell with update manager and SRM scripts.
Table of Contents (13 chapters)
PowerCLI Essentials
About the Author
About the Reviewer

Chapter 3. Enhancing the Scripting Experience

Monday morning rolls around and the boss comes into your office with a big smile on his face, says "Great report!" in his loud booming voice, and continues, "The information you provided helped the department secure another $150k for the budget. We are supposed to build a new automation framework that will allow us to produce these types of reports for the management team on a weekly basis." So you reply, "So we got a $150k budget for developing this framework in-house?". The boss chuckles and says, "No, it is for an office renovation. I'm getting my corner window office!" and he walks away laughing. "Typical!" you think.

In building an automation framework, there needs to be a methodology to document procedures, create central stores, establish tools, design development standards, and form repositories. Each piece takes time, and in some cases, capital. However, setting precedence beforehand makes the task of sorting and running the scripts later...