VMware vSphere PowerCLI Reference. Graf Brian. Читать онлайн. Newlib. NEWLIB.NET

Автор: Graf Brian
Издательство: Автор
Серия:
Жанр произведения: Зарубежная образовательная литература
Год издания: 0
isbn: 9781118925140
Скачать книгу
backup, the replication of key data to an alternate location in case of data or hardware loss.

      Chapter 12: Organize Your Disaster Recovery covers designing your disaster recovery strategy. While the application server is servicing the user interface, the heart of the vCenter Server is stored in the backend database. Learn how to back up and restore your vCenter Server database when you don’t have SQL Server Management Studio available. This chapter will also walk you through both exporting and importing of specific objects found in your vCenter server, including roles and permissions, tags, folders, VM locations, and more.

      Chapter 13: Hardening the vSphere Environment shows how you can use the Hardening Guides to secure your vSphere environment. After providing some familiarization with the Hardening Guide, this chapter provides methods for assessing and remediating the guidelines. You’ll find scripts that allow you to report the current settings, and some of the same scripts can also be used to configure these settings as advised in the Hardening Guide. The chapter also provides some tips on extending the functions described and explores PowerShell coding nuances.

      Chapter 14: Maintain Security in Your vSphere Environment concentrates on host patching. Whatever operating system or application you are responsible for, it is important to keep it up-to-date. ESXi is no different in this respect, and VMware provides a management tool known as vCenter Update Manager (VUM) to assist with this process. We’ll introduce you to the set of PowerCLI cmdlets available for download that enable automation for VUM.

Part IV: Monitoring and Reporting

      Chapters 15–17 show how you can automate all the reporting aspects of your VMware vSphere environment. These chapters discuss how to report on the physical hardware, virtual hardware, and configuration parameters; how to gather statistical data for performance and capacity planning reports; how to create an audit trail; and how to monitor the environment.

      Chapter 15: Reporting and Auditing shows you how to report on the most used areas of your virtual environment. When you’ve learned how to create reports and what to report on, you’ll see how to customize reports for your specific needs and how to export them into various formats. The chapter also provides guidance on how to use PowerShell for data manipulation, including sorting, grouping, and formatting, as well as discussion of PowerShell objects and their properties/members.

      Chapter 16: Using Statistical Data helps you obtain and analyze the built-in statistical data you need to determine how well your vSphere environment is faring over time. This chapter also discusses sources of this data along with schedules for gathering metrics, how to adjust these schedules, and more!

      Chapter 17: Alarms helps you determine what you need to monitor and how to employ alarms in the monitoring process. Remember Murphy’s Law! To capture these unforeseen events and to react to them as fast as possible, you need to monitor your vSphere environment at all times.

Part V: Integration

      In Chapters 18–23, we expand to the wider VMware product world and examine how to integrate PowerCLI with the broader range of VMware product offerings.

      Chapter 18: The SDK will show you how you can use the vSphere SDK. Now why would a book on PowerCLI bother with the vSphere SDK? The answer is simple. With the help of the vSphere SDK, your scripts can go that extra mile and perform functions that would otherwise not be available to you.

      Chapter 19: vCloud Director examines how you can create and manage different aspects of your vCloud Director environment, from managing organizations to managing access control rules and vApps. This chapter will help you get a handle on automating mundane tasks that often plague vCloud Director administrators.

      Chapter 20: vCloud Air builds off the previous chapter and walks you through connecting and automating vCloud Air using the new vCloud Air PowerCLI cmdlets. This chapter describes connecting to your target virtual datacenter as well as PowerCLI configuration that will allow you to quickly and easily connect to virtual machines in the cloud. Wrapping up the chapter, we show you how to work with the Cloud Infrastructure view (CIView) to invoke API methods that do not have associated PowerCLI cmdlets, allowing you to create your own advanced functions.

      Chapter 21: vRealize Orchestrator examines VMware’s orchestration product and how to use PowerShell to integrate with systems when the native Orchestrator tools don’t suffice. We also look at how to manipulate the vRealize Orchestrator REST API with PowerShell.

      Chapter 22: Site Recovery Manager walks you through reporting on the status of your protected virtual machines, adding and removing VMs from your recovery plans, and testing your disaster recovery plan using automation to trigger the test after each modification. Constant and consistent validation leads to confidence in your infrastructure when you need it.

      Chapter 23: PowerActions examines VMware Flings and how to integrate your PowerCLI scripts into the vSphere Web Client.

Part VI: PowerCLI and DevOps

      In Chapters 24 and 25, we expand on the automation scripts themselves. We’ll show you how to begin to work in a DevOps fashion by integrating with source control systems and methods for running your scripts.

      Chapter 24: Source Control will show you how to safely store and track your code and also work on code projects as part of a team, using both in-house and publicly available source control tools.

      Chapter 25: Running Scripts examines several ways to run a PowerShell script in your environment. We also provide hints and tricks on how to load modules, make logging a central part of your script, and even safely pass credentials into your scheduled task.

      Appendix: Example Reports provides further discussion on the Reporting topic from Chapter 15. The stack of examples range from code snippets to blocks of code mining details and data to full-fledged functions for reporting on hardware devices and configurations, along with accompanying usage explanations.

note.tif

      NOTE You can download all the files and resources mentioned in the book from www.wiley.com/go/vmwarevspherepowercli2e.

      How to Contact the Authors

      We welcome feedback from you about this book. We’ve developed a message board for everything related to the book at www.powerclibook.com. Stop by and let us know how we did, check for updates, and join the discussion. If you have specific questions, send us a message at [email protected]. You can also connect to each of us through our blogs or via Twitter as mentioned in the “About the Authors” section:

      Matt Boren – The vNugglets at www.vNugglets.com

      Luc Dekens – LucD Notes: My PowerShell Ramblings at www.lucd.info

      Brian Graf – Brian Graf’s Virtualization Blog at www.vtagion.com

      Jonathan Medd – Jonathan Medd’s Blog: Automating anything that moves.. at www.jonathanmedd.net

      Glenn Sizemore – Practical Administrator: Lessons of a Datacenter Administrator at http://practical-admin.com, or @Glnsize on Twitter.

      Andrew Sullivan – Practical Administrator: Lessons of a Datacenter Administrator at http://practical-admin.com

      Wiley strives to keep you supplied with the latest tools and information you need for your work. Please check the book’s update page on the Wiley website at www.wiley.com/go/vmwarevspherepowercli2e. Here, we’ve posted optimized electronic copies of the scripts, batch files, and tools created for this book. We’ll post additional content and updates that supplement this book if the need arises.

      Part I

      Install, Configure, and Manage the vSphere Environment

      •