PowerCLI Essentials
eBook - ePub

PowerCLI Essentials

Chris Halverson

Compartir libro
  1. 194 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

PowerCLI Essentials

Chris Halverson

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Simplify and automate server administration tasks with PowerCLI

About This Book

  • Automate VMware's VSphere environment by learning the essentials of PowerCLI
  • Impress your peers by developing scripts to perform administration tasks
  • Discover the intricate workings of PowerCLI through simple and real-life examples

Who This Book Is For

PowerCLI Essentials is focused toward virtualization professionals and system administrators who want to discover and learn about the automation techniques associated with PowerCLI for complex virtual environments.

What You Will Learn

  • Download and install PowerCLI and its basics as well as the basics of PowerShell
  • Enchance your scritping experience
  • Build longer scripts and simpler reports
  • Relate a task in VMware administration to a PowerCLI script
  • Discover methods to acquire and change information remotely
  • Set up orchestrator to manage your workflow

In Detail

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.

Style and approach

Each and every topic in this book is explained in a very easy-to-follow fashion with real-life, simple examples so you'll get an idea not only about working with PowerCLI, but will also get an idea about scripting.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es PowerCLI Essentials un PDF/ePUB en línea?
Sí, puedes acceder a PowerCLI Essentials de Chris Halverson en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Virtualización. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2016
ISBN
9781785881770
Edición
1
Categoría
Virtualización

PowerCLI Essentials


Table of Contents

PowerCLI Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. An Introduction to Essential Administration with PowerCLI
Why this book, and why now?
Understanding PowerShell versions
The basic structure of PowerShell
Why is version understanding important?
v2 or v3 – what's the difference?
Installing PowerShell v3 on a Windows 7 or Windows 2008 R2 machine
Understanding PowerCLI
Getting PowerCLI versions
The PowerCLI change log
Getting PowerCLI
Pre-requisites before getting PowerCLI
Downloading PowerCLI
Installing PowerCLI
Getting help
Setting up the PowerCLI installation
Summary
2. Comparing Point and Click Administration to PowerCLI and Scripting
Getting started
Where do we begin?
Where do we find scripts and snippets that are safe to run?
VMware communities
VMware blogs
VMware flings
PowerGUI
Notepad++
PowerShell Scriptomatic
Microsoft TechNet Script Center
Programming interfaces
Writing the script
Planning the purpose
Thinking through a script
Planning the output
Making the script
Final script
Report-VMHostConfigStatus
Starting with the inputs
Getting the current configuration
Output of data
Getting the same information through PowerCLI
Network
Storage
Output
Final script of the report
Summary
3. Enhancing the Scripting Experience
Code repositories – why would I need that?
Building an internal repository
Using a third-party tool for code check-in and check-out
Send it to the cloud! Publicly accessible script repositories
Conclusions
Scripting with the intention to reuse
Functions, functions, functions – the fun with functions
Example of a multifunctional script
Using modules
Calling other scripts within the script
Example of a framework script
Building a framework that others can build upon
Running a workflow
Quality control, consistency, and simplification
Revisiting documentation
Script simplification
Error handling
Verification testing
Version control and keeping previous versions
What signifies a major version versus a minor version
Storing versions
Building a VM script using all the pieces
Summary
4. Windows Administration within VMware Administration
What is DevOps?
Starting a DevOps practice
Defining the roles
An example process
Duties of the Automation Engineer
Building the script
Mixing PowerCLI and standard PowerShell
Building a Windows script host
Using commands to enable remote desktops on a Windows 2012 R2 server
Running PowerCLI and Windows Administration
A script example
Thinking through the script
Building the script
Invoke-VMScript configuration
Running remote on a Linux guest
Basic BASH
Invoke-VMScript configuration
Introduction to vRealize Orchestrator
Summary
5. Workflows and vRealize Orchestrator
Workflows
The beginning of a workflow
The planning stage
The design phase
The implementation phase
The testing phase
Promotion or closeout
vRealize Orchestrator
Architecture and history
Sample environment
Where to get it?
Prerequisites to installation
Installation
Installing the standalone instance
Configuring and integration
Summary
6. Running Workflows with Other VMware Products
Orchestrating VMware products
Orchestrating with Orchestrator
Workflows
Orchestrating the integration of NSX
NSX conceptual overview
PowerCLI and NSX
Orchestrating the integration of Site Recovery Manager
PowerCLI and SRM
Running PowerShell scripts in a Recovery Plan
Orchestrating the integration of Monitoring (vROps)
Connecting to the vRealize Operations Manager
PowerCLI and vROps
Performance tools
Orchestration of Storage (VSAN)
VSAN and PowerCLI
Summary
Index

PowerCLI Essentials

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2016
Production reference: 1210416
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-177-0
www.packtpub.com

Credits

Author
Chris Halverson
Reviewer
Tom Franken
Acquisition Editor
Divya Poojari
Content Development Editor
Onkar Wani
Technical Editor
Menza Mathew
Copy Editor
Merilyn Pereira
Project Coordinator
Bijal Patel
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Chris Halverson is a senior consultant for VMware in the Professional Services Organization in Canada. He specializes in the full Software-Defined Data Center (SDDC) stack, architecting, designing, and deploying customer solutions. He has been active in the VMware community as a VMUG leader for the past 4 years and prides himself as an active...

Índice