Mastering PowerCLI
暫譯: 精通 PowerCLI

Sajal Debnath

  • 出版商: Packt Publishing
  • 出版日期: 2015-10-20
  • 售價: $2,420
  • 貴賓價: 9.5$2,299
  • 語言: 英文
  • 頁數: 430
  • 裝訂: Paperback
  • ISBN: 1785286854
  • ISBN-13: 9781785286858
  • 海外代購書籍(需單獨結帳)

商品描述


Master PowerCLI to automate all aspects of VMware environments


About This Book



  • Leverage PowerCLI to perform administration tasks in a more effective and efficient way

  • Escape from daily tedious and repetitive tasks by unleashing the full potential of your creative side through scripting

  • Master the intricate workings of PowerShell and PowerCLI through easy and real-life examples


Who This Book Is For


If you are a system administrator with working knowledge of PowerShell and PowerCLI who wants to perform quick and easy scripting but at the same time achieve complex results and write production grade scripts, then this book is for you.


What You Will Learn



  • Use GitHub for collaboration and Pester to automate unit tests

  • Write advanced reusable functions and dynamic variables and learn about error handling in PowerShell

  • Automate ESXi host installation using Auto-Deploy, host profile, and host image

  • Implement security best practices in a vSphere data center

  • Manage SRM, vCloud Air, and vRealize Operations environments

  • Access and utilize vSphere APIs to manage advanced aspects of vSphere and work with .NET view objects

  • Utilize REST APIs to manage vRealize Automation environments

  • Create a Windows GUI through the use of PowerShell and Sapien PrimalForms CE


In Detail


Have you ever wished that every morning you could automatically get a report with all the relevant information about your datacenter in exactly the same format you want? Or whether you could automate that boring, exhausting task? What if some crucial task needs to be performed on a regular basis without any error? PowerCLI scripts do all that and much more for VMware environments. It is built on top of the popular Windows PowerShell, with which you can automate server tasks and reduce manual input, allowing you to focus on more important tasks.


This book will help you to achieve your goals by starting with a short refresher on PowerShell and PowerCLI and then covering the nuances of advanced functions and reusable scripts. Next you will learn how to build a vSphere-powered virtualized datacenter using PowerCLI while managing different aspects of the environment including automated installation, network, and storage. You will then manage different logical constructs of vSphere environment and different aspects of a virtual machine.


Later, you will implement the best practices for a security implementation in vSphere Environment through PowerCLI before discovering how to manage other VMware environments such as SRM, vCloud Director and vCloud Air through PowerCLI. You will also learn to manage vSphere environments using advanced properties by accessing vSphere API and REST APIs through PowerCLI.


Finally, you will build a Windows GUI application using PowerShell followed by a couple of sample scripts for reporting and managing vSphere environments with detailed explanations of the scripts. By the end of the book, you will have the required in-depth knowledge to master the art of PowerCLI scripting.


Style and approach


In this book, every topic is explained in a very easy-to-follow fashion with real-life, simple examples so that you get an idea of not only the topic but also the context in which it should be used or where it can be best utilized.

商品描述(中文翻譯)

**掌握 PowerCLI 自動化 VMware 環境的各個方面**

## 本書介紹

- 利用 PowerCLI 以更有效率的方式執行管理任務
- 通過腳本釋放創造力的潛力,擺脫日常繁瑣重複的任務
- 通過簡單且真實的範例掌握 PowerShell 和 PowerCLI 的複雜運作

## 本書適合誰

如果您是一位具備 PowerShell 和 PowerCLI 工作知識的系統管理員,想要快速簡單地進行腳本編寫,同時達成複雜的結果並撰寫生產級的腳本,那麼這本書就是為您而寫。

## 您將學到什麼

- 使用 GitHub 進行協作,並使用 Pester 自動化單元測試
- 編寫高級可重用函數和動態變數,並學習 PowerShell 中的錯誤處理
- 使用 Auto-Deploy、主機配置檔和主機映像自動化 ESXi 主機安裝
- 在 vSphere 數據中心中實施安全最佳實踐
- 管理 SRM、vCloud Air 和 vRealize Operations 環境
- 訪問和利用 vSphere API 來管理 vSphere 的高級方面,並與 .NET 視圖對象協作
- 利用 REST API 管理 vRealize Automation 環境
- 通過 PowerShell 和 Sapien PrimalForms CE 創建 Windows GUI

## 詳細內容

您是否曾希望每天早上能自動獲得一份報告,包含有關您的數據中心的所有相關信息,並且格式正好符合您的需求?或者您是否希望能自動化那些無聊且耗費精力的任務?如果某些關鍵任務需要定期執行且不出錯,該怎麼辦?PowerCLI 腳本可以為 VMware 環境完成這一切,甚至更多。它建立在流行的 Windows PowerShell 之上,您可以利用它自動化伺服器任務,減少手動輸入,讓您能專注於更重要的任務。

本書將幫助您實現目標,首先簡要回顧 PowerShell 和 PowerCLI,然後涵蓋高級函數和可重用腳本的細微差別。接下來,您將學習如何使用 PowerCLI 建立一個以 vSphere 為基礎的虛擬化數據中心,同時管理環境的不同方面,包括自動安裝、網絡和存儲。然後,您將管理 vSphere 環境的不同邏輯結構和虛擬機的不同方面。

之後,您將通過 PowerCLI 實施 vSphere 環境中的安全實施最佳實踐,然後學習如何通過 PowerCLI 管理其他 VMware 環境,如 SRM、vCloud Director 和 vCloud Air。您還將學習如何通過 PowerCLI 訪問 vSphere API 和 REST API 來使用高級屬性管理 vSphere 環境。

最後,您將使用 PowerShell 構建一個 Windows GUI 應用程序,並提供幾個範例腳本,用於報告和管理 vSphere 環境,並詳細解釋這些腳本。到本書結束時,您將擁有掌握 PowerCLI 腳本編寫藝術所需的深入知識。

## 風格與方法

在本書中,每個主題都以非常易於理解的方式進行解釋,並提供真實的簡單範例,讓您不僅了解主題,還能理解其應用的背景或最佳利用的情境。