VMware vSphere™ PowerCLI Reference: Automating vSphere Administration

Book description

Your One-Stop Reference for VMware vSphere Automation

If you manage vSphere in a Windows environment, automating routine tasks can save you time and increase efficiency. VMware vSphere PowerCLI is a set of pre-built commands based on Windows PowerShell that is designed to help you automate vSphere processes involving virtual machines, datacenters, storage, networks, and more. This detailed guide—using a practical, task-based approach and real-world examples—shows you how to get the most out of PowerCLI's handy cmdlets.

Learn how to:

  • Automate vCenter Server and ESX/ESX(i) Server deployment and configuration

  • Create and configure virtual machines and use vApps

  • Secure, back up, and restore your virtual machines

  • Monitor, audit, and report the status of your vSphere environment

  • Use the PowerCLI SDK, PowerWF Studio, and vEcoShell

  • Schedule and view automation

  • Add a GUI front end to your scripts

  • Table of contents

    1. Cover
    2. Title Page
    3. Copyright
    4. Publisher's Note
    5. Dedication
    6. Acknowledgments
    7. About the Authors
    8. Forewords
    9. Introduction
      1. Who Should Read This Book
      2. What Is Covered in This Book
      3. How to Contact the Authors
    10. PART I: Install, Configure, and Manage the vSphere Environment
      1. Chapter 1: Automating vCenter Server Deployment and Configuration
        1. Prepare the vCenter Installation
        2. Create an Automated Installation
        3. Set Up Your vCenter Server Folder Structure
        4. Define Users and Their Privileges
        5. Configure Datacenters and Clusters
        6. Licensing
      2. Chapter 2: Automating vSphere Hypervisor Deployment and Configuration
        1. Prepare for an Installation
        2. Automate an Installation
      3. Chapter 3: Automating Storage and Networking
        1. Set Up the Storage
        2. Set Up the Network
      4. Chapter 4: Using Advanced vSphere Features
        1. Manage vNetwork Distributed Switches
        2. Use Fault Tolerance
        3. Configure Storage I/O Control
        4. Use Distributed Power Management
        5. Configure Host Profiles
        6. Configure Active Directory Integration
    11. PART II: Managing the Virtual Machine Life Cycle
      1. Chapter 5: Creating Virtual Machines
        1. Use the New-VM Cmdlet
        2. Use the SDK
        3. Perform a Mass Deployment
        4. Identify Eye-Catchers for Auditing
        5. Maintain VMware Tools
      2. Chapter 6: Using Templates and Customization Specifications
        1. Use Customization Specifications
        2. Use Templates
      3. Chapter 7: Configuring Virtual Machine Hardware
        1. Add, Configure, and Remove Virtual Hardware
        2. Optimize Storage Usage with Thin Provisioning
      4. Chapter 8: Advanced Virtual Machine Features
        1. Interact with the Guest OS
        2. Use vMotion and Storage vMotion
        3. Use and Manage Snapshots
      5. Chapter 9: Using vApps
        1. Import Virtual Appliances
        2. Create Your Own vApps
        3. Maintain vApps
    12. PART III: Securing Your vSphere Environment
      1. Chapter 10: Backing Up and Restoring Your Virtual Machines
        1. Work with Snapshots
        2. Create Do-It-Yourself Backups
        3. Restore Your VMs from a DIY Backup
        4. Change Block Tracking
        5. Use Site Recovery Manager
        6. Provide PowerShell Support for Corporate Backup Applications
      2. Chapter 11: Organize Your Disaster Recovery
        1. Back Up Your vCenter Server
        2. Restore Your vCenter Server
        3. Export vCenter Server Inventory Items
        4. Import vCenter Server Inventory Items
        5. Recover Virtual Machines
      3. Chapter 12: Hardening the vSphere Environment
        1. Use the Hardening Guide
        2. Work with the Guidelines
        3. Bring It All Together
      4. Chapter 13: Maintain Security in Your vSphere Environment
        1. Install the vCenter Update Manager PowerCLI Snap-in
        2. Work with Baselines
        3. Work with Upgrades and Patches
        4. Report the Security Status
    13. PART IV: Monitoring and Reporting
      1. Chapter 14: Reporting the Status of Your vSphere Environment
        1. Determine What to Report
        2. Customize Your Reports
      2. Chapter 15: Using Statistical Data
        1. Understand Some Basic Concepts
        2. Gather Statistical Data
        3. Offload Statistical Data
      3. Chapter 16: Monitoring the vSphere Environment
        1. Determine What to Monitor
        2. Use Alarms
      4. Chapter 17: Auditing the vSphere Environment
        1. Understand Tasks and Events Data
        2. Report the PowerCLI Way
        3. Report the SDK Way
        4. Configure Tasks and Events Retention
    14. PART V: Scripting Tools and Features
      1. Chapter 18: Scheduling Automation Scripts
        1. Use the vCenter Server Scheduler
        2. Use the Windows Scheduler
      2. Chapter 19: The SDK
        1. Work with the vSphere SDK
        2. Use the vSphere API Reference
        3. Use Managed Objects
        4. Code Parameter Objects
        5. Find the Method You Need
        6. Understand Return Values and Faults
        7. Put Some Tips and Tricks to Good Use
      3. Chapter 20: The Onyx Project
        1. Work with the Onyx Project
        2. Let Onyx Help You
        3. Use Onyx
        4. Work with References
        5. Use Onyx in the Real World
      4. Chapter 21: PowerGUI and vEcoShell
        1. Understand GUI Environments in Managing Automation
        2. Use PowerPacks to Manage Automation Scripts
      5. Chapter 22: PowerWF Studio
        1. Understand PowerWF Studio’s Capabilities
        2. Integrate PowerWF Studio
        3. Use PowerCLI in PowerWF Studio
        4. Use a Workflow
        5. Create Typical Workflows
      6. Chapter 23: Add a GUI Front-End to Your Automation Scripts
        1. Appreciate the Value of a GUI
        2. Choose the Correct Tool
        3. Create Some Basic WinForms
        4. Create a Somewhat Advanced Example
    15. Index
    16. Appendix A: Basic PowerShell
      1. Discover PowerShell’s Origins
      2. Develop Your Understanding of Objects
      3. Uncover Cmdlets and Get Help
      4. Utilize the PowerShell Pipeline
      5. Build Your Toolkit of Basic Cmdlets
    17. Appendix B: References and Links
      1. General Resources
      2. Chapter Resources

    Product information

    • Title: VMware vSphere™ PowerCLI Reference: Automating vSphere Administration
    • Author(s):
    • Release date: April 2011
    • Publisher(s): Sybex
    • ISBN: 9780470890790