Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering PowerCLI

You're reading from   Mastering PowerCLI Master PowerCLI to automate all aspects of VMware environments

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher Packt
ISBN-13 9781785286858
Length 430 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sajal Debnath Sajal Debnath
Author Profile Icon Sajal Debnath
Sajal Debnath
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Mastering PowerCLI
Credits
Foreword
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. PowerShell and PowerCLI Refresher FREE CHAPTER 2. Reusable Advanced Functions and Scripts 3. Deploying vSphere Hosts 4. Managing Networks 5. Managing Storage 6. Managing Clusters and Other Constructs 7. Managing Virtual Machines 8. Managing vSphere Security, SRM, vCloud Air, and vROps 9. Managing the vSphere API 10. Using REST APIs 11. Creating Windows GUI 12. Best Practices and Sample Scripts Index

Index

A

  • alarm actions
    • cmdlets, using / Managing alarms
  • alarm action triggers
    • cmdlets, using / Managing alarms
  • alarms
    • managing / Managing alarms
    • cmdlets, using / Managing alarms
    • alarm definition / Managing alarms
    • alarm action / Managing alarms
    • alarm action trigger / Managing alarms
  • anti-affinity rule
    • using / Using the DRS affinity and anti-affinity rules
    • cmdlets, using / Using the DRS affinity and anti-affinity rules
  • approvals
    • managing / Managing approvals
  • assertions
    • defining / Testing your scripts using Pester
  • Auto Deploy
    • configuring, for ESXi hosts / Configuring Auto Deploy for ESXi hosts
    • defining / Configuring Auto Deploy for ESXi hosts
  • automation
    • through PowerShell scripts / Automation through PowerShell scripts

B

  • baselines
    • cmdlets, managing / Managing vSphere Update Manager
  • behavior-driven development (BDD)
    • about / Testing your scripts using Pester
  • best practices, PowerShell scripting
    • defining / Best practices
  • black box testing
    • about / Testing your scripts using Pester
    • URL / Testing your scripts using Pester
  • boot process
    • URL / Configuring Auto Deploy for ESXi hosts
  • branch
    • creating / Branch

C

  • capabilities
    • defining, from VSAN storage provider / Cmdlets related to policy backup and migration
  • capacity check report
    • defining / Capacity check report
    • parameters, defining / Parameter descriptions
  • Catch block
    • about / Error handling in PowerShell
  • checkpoints
    • defining / Testing your scripts using Pester
  • cluster
    • about / Cluster
    • cmdlets, using / Cluster
  • cmdlet, disk size
    • URL / Hard disks
  • cmdlet parameters, Invoke-RestMethod cmdlet
    • defining / The Invoke-RestMethod cmdlet
  • cmdlets, ESXi host networking
    • using / Managing networking for ESXi
  • commands, Git
    • git init / Branch
    • git help / Branch
    • git status / Branch
    • git add / Branch
    • git commit / Branch
    • git branch / Branch
    • git checkout / Branch
    • git merge / Branch
    • git push / Branch
    • git pull / Branch
  • comment-based help
    • creating / Creating comment-based help
    • using / Creating comment-based help
    • rules / Creating comment-based help
    • in functions / Creating comment-based help
    • in scripts / Creating comment-based help
    • in script modules / Creating comment-based help
    • keywords / Creating comment-based help
    • keywords, URL / Creating comment-based help
  • comparison operators
    • about / Conditional logic
  • conditional logic
    • about / Conditional logic
    • loops, using / Conditional logic using loops
  • content library
    • managing / Managing Content Libraries
    • reference / Managing Content Libraries

D

  • datacenter
    • about / Datacenter
    • cmdlets, using / Datacenter
  • datastore clusters
    • using / Using datastore clusters
    • cmdlets, using / Using datastore clusters
    • parameters, setting / Using datastore clusters
  • datastores
    • managing / Managing datastores
    • cmdlets / Managing datastores
  • default duration
    • reference / Authenticating and getting a vRA token
  • depot
    • creating / Image Builder with PowerCLI
    • URL / Image Builder with PowerCLI
  • Distributed Power Management
    • configuring / Configuring Distributed Power Management
  • Distributed Power Management (DPM)
    • about / Configuring Distributed Power Management
  • Distributed Resource Scheduling (DRS)
    • about / Configuring Distributed Power Management
  • DRS affinity rule
    • using / Using the DRS affinity and anti-affinity rules
  • dynamic parameters
    • about / Dynamic parameters
    • requirements / Dynamic parameters
    • using / Dynamic parameters
  • Dynamic Resource Scheduling
    • using / Using Dynamic Resource Scheduling

E

  • $ErrorActionPreference
    • about / Error handling in PowerShell
    • values / Error handling in PowerShell
  • Enhanced vMotion Compatibility mode
    • configuring / Configuring the Enhanced vMotion Compatibility mode
    • URL / Configuring the Enhanced vMotion Compatibility mode
  • enhancement list
    • URL / PowerShell
  • enumeration
    • about / Using the vSphere API
  • error handling, PowerShell
    • references / Error handling in PowerShell
  • ESXi
    • networking, managing for / Managing networking for ESXi
  • ESXi host
    • firewall and services, configuring / Configuring a firewall and services in an ESXi host
  • ESXi host networking
    • cmdlets / Managing networking for ESXi
  • ESXi hosts
    • Auto Deploy, configuring for / Configuring Auto Deploy for ESXi hosts
  • ESXi server
    • booting, from Auto Deploy server / Configuring Auto Deploy for ESXi hosts
  • Extended Unique Identifier (EUI)
    • about / Managing datastores
  • ExtensionData property
    • used, for returning .NET View objects / Using the ExtensionData property to return .NET View objects

F

  • Fault Tolerance (FT)
    • configuring / Configuring Fault Tolerance
    • about / Configuring Fault Tolerance
  • features, ISESteroids
    • URL / ISESteroids
  • Fibre Channel (FC)
    • about / Configuring Fibre Channel storage
  • Fibre Channel storage
    • configuring / Configuring Fibre Channel storage
  • Finally block
    • about / Error handling in PowerShell
  • firewall and services
    • configuring, in ESXi host / Configuring a firewall and services in an ESXi host
  • folder
    • about / Folder
    • cmdlets, using / Folder
  • Foreach
    • and Foreach-object, comparing / The difference between Foreach and Foreach-object
  • fork & pull model
    • about / The fork
  • function attributes
    • specifying / Specifying function attributes

G

  • Get-OMStatKey cmdlet
    • URL / Managing vRealize Operations Manager
  • Get-View cmdlet
    • used, for returning .NET View objects / Using the Get-View cmdlet to return .NET View objects
    • URL / Using the Get-View cmdlet to return .NET View objects
  • Git
    • advantages / Using version control with GitHub
    • and other version control systems, comparing / Using version control with GitHub
    • references / Using version control with GitHub
  • GitHub
    • version control, using with / Using version control with GitHub
    • using / Using version control with GitHub
    • URL / Using version control with GitHub
  • GitHub Desktop
    • URL / Using version control with GitHub
  • GitHub workflow
    • defining / Branch
  • guest OS
    • managing / Managing the guest OS
  • GUI, using Windows Forms
    • defining / Building a GUI using Windows Forms
    • button, creating / Creating a button
    • TextBox, creating / Creating a TextBox
    • ListBox, creating / Creating ListBox
    • CheckBox, creating / Creating CheckBox
  • GUI, using WPF
    • defining / Building GUI using WPF
    • URL / Building GUI using WPF
  • GUI tool
    • using / Branch

H

  • hard disks
    • cmdlets, defining / Hard disks
  • High Availability (HA)
    • configuring / Configuring High Availability
    • about / Configuring Distributed Power Management
  • host profile
    • about / Using host profiles
  • host profiles
    • using / Using host profiles
    • managing / Managing host profiles
    • cmdlets, using / Managing host profiles
  • hosts
    • adding, to vCenter server / Adding hosts to a vCenter server
  • HTTP methods
    • using / Introducing REST APIs

I

  • Image Builder
    • defining, with PowerCLI / Image Builder with PowerCLI
    • using / Image Builder with PowerCLI
    • architecture / Image Builder with PowerCLI
    • need for / Image Builder with PowerCLI
    • cmdlets, using / Image Builder with PowerCLI
  • image profile
    • about / Image Builder with PowerCLI
  • in-circuit testing (ICT)
    • about / Testing your scripts using Pester
  • Invoke-RestMethod cmdlet
    • about / The Invoke-RestMethod cmdlet
  • iSCSI adapters
    • software iSCSI adapter / Configuring iSCSI storage
    • hardware iSCSI adapter / Configuring iSCSI storage
  • iSCSI storage
    • configuring / Configuring iSCSI storage
  • ISESteroids
    • URL / ISESteroids

J

  • Job Control Language (JCL)
    • about / The history of scripting
  • JSON
    • defining / Introducing JSON
    • and XML, comparing / Introducing JSON
    • syntax rules / Syntax rules
    • values / Values
  • JSON file
    • URL / Listing shared and private catalog items

L

  • logical operators
    • about / Conditional logic

M

  • machines
    • managing / Managing machines
  • MoRef (Managed Object Reference)
    • about / Using the ExtensionData property to return .NET View objects

N

  • .NET View objects
    • returning, Get-View cmdlet used / Using the Get-View cmdlet to return .NET View objects
    • returning, ExtensionData property used / Using the ExtensionData property to return .NET View objects
  • Netflow
    • configuring / Configuring Netflow
    • URL / Configuring Netflow
  • Netflow, disabling
    • URL / Configuring Netflow
  • network adapters
    • cmdlets, defining / Network adapters and USB devices
  • Network Addressing Authority (NAA)
    • about / Managing datastores
  • networking
    • managing, for ESXi / Managing networking for ESXi
  • network profiles
    • managing / Managing network profiles
  • New-Datastore cmdlet
    • URL / Configuring iSCSI storage
  • New-VM cmdlet
    • URL / Creating virtual machines
  • NFS storage
    • configuring / Configuring NFS storage
  • NIC Teaming
    • about / Managing networking for ESXi

O

  • Object categories
    • managed object types / Using the vSphere API
    • data object types / Using the vSphere API
    • enumerated data types / Using the vSphere API
    • fault type / Using the vSphere API
  • Onyx
    • about / Generating PowerCLI code using Onyx
    • used, for generating PowerCLI code / Generating PowerCLI code using Onyx
    • URL / Generating PowerCLI code using Onyx
    • reference / Generating PowerCLI code using Onyx
  • options, CmdletBinding()
    • defining / Specifying function attributes
  • options, parameter attributes
    • Mandatory argument / Specifying parameter attributes
    • Position argument / Specifying parameter attributes
    • ValueFromPipeline / Specifying parameter attributes
    • Alias / Specifying parameter attributes
  • OS customization specifications
    • managing / Managing OS customization specifications

P

  • Package Control
    • URL / Sublime Text
  • parameter attributes
    • specifying / Specifying parameter attributes
    • URL / Using parameter validation attributes
  • parameters, capacity check report
    • defining / Parameter descriptions
  • parameters, PowerShell function
    • static / Specifying function attributes
    • dynamic / Specifying function attributes
  • parameters, vRA
    • Accept / Authenticating and getting a vRA token
    • Content-Type / Authenticating and getting a vRA token
  • parameter validation attributes
    • using / Using parameter validation attributes
    • AllowNull / AllowEmptyString / Using parameter validation attributes
    • ValidateCount / Using parameter validation attributes
    • ValidateLength / Using parameter validation attributes
    • ValidatePattern / Using parameter validation attributes
  • permissible types, ViewType parameter
    • defining / Using the Get-View cmdlet to return .NET View objects
  • Pester
    • used, for testing scripts / Testing your scripts using Pester
    • about / Testing your scripts using Pester
    • URL / Testing your scripts using Pester
  • Pester Wiki
    • URL / Testing your scripts using Pester
  • port blocking
    • cmdlets, defining / Configuring port blocking
  • port group management
    • cmdlets / Managing port groups
  • port groups
    • managing / Managing port groups
  • ports
    • working with / Working with ports
    • cmdlets, defining / Working with ports
    • traffic shaping, configuring / Configuring traffic shaping
    • port blocking, configuring / Configuring port blocking
    • security policy, configuring / Configuring the security policy
    • teaming policy, configuring / Configuring the teaming policy
  • PowerActions, for vSphere Web Client
    • defining / PowerActions for vSphere Web Client
    • URL / PowerActions for vSphere Web Client
    • prerequisites / PowerActions for vSphere Web Client
    • installing / PowerActions for vSphere Web Client
  • PowerCLI
    • defining / The essence of PowerShell and PowerCLI, PowerCLI
    • features / PowerCLI
    • components / PowerCLI
    • Image Builder, using with / Image Builder with PowerCLI
    • cmdlets, defining / Creating virtual machines
  • PowerCLI cmdlets
    • used, for connecting to vCenter / Connecting to a vCenter and other VMware environments using PowerCLI cmdlets
    • used, for connecting to other VMware environments / Connecting to a vCenter and other VMware environments using PowerCLI cmdlets
  • PowerCLI code
    • generating, Onyx used / Generating PowerCLI code using Onyx
  • PowerCLI extensions
    • used, for configuring vFLASH / Configuring vFLASH using PowerCLI Extensions
    • URL / Configuring vFLASH using PowerCLI Extensions
    • reference / Configuring vFLASH using PowerCLI Extensions
  • PowerCLI Scripts
    • about / PowerActions for vSphere Web Client
  • PowerShell
    • defining / The essence of PowerShell and PowerCLI, PowerShell
    • command types / PowerShell
    • programming constructs, implementing / Implementing programming constructs in PowerShell
    • URL / Implementing programming constructs in PowerShell, Sublime Text
    • conditional logic / Conditional logic
    • error handling / Error handling in PowerShell
  • PowerShell code repository
    • URL / Adding hosts to a vCenter server
  • PowerShell help files
    • defining / PowerShell help files
  • PowerShell scripts
    • automation, using through / Automation through PowerShell scripts
  • private VLANs
    • creating / Creating private VLANs
  • programming constructs
    • implementing, in PowerShell / Implementing programming constructs in PowerShell
  • proper editor
    • using / Using a proper editor
    • Sublime Text, defining / Sublime Text
    • ISESteroids, defining / ISESteroids
  • properties, Distributed Power Management
    • defining / Configuring Distributed Power Management
  • provisioned resources
    • managing / Managing provisioned resources

R

  • Raw Device Mapping (RDM)
    • using / Using Raw Device Mapping
    • about / Using Raw Device Mapping
  • Representational State Transfer (REST or ReST)
    • about / Introducing REST APIs
  • resource pools
    • managing / Managing resource pools
    • cmdlets, using / Managing resource pools
    • creating / Managing resource pools
  • resources, REST
    • advantages / Introducing REST APIs
  • Resource URI
    • reference / vRealize Automation REST APIs
  • REST
    • URL / Introducing REST APIs
  • REST APIs
    • defining / Introducing REST APIs
    • URL / Introducing REST APIs
  • REST API services, vRA
    • Advanced Designer Service / vRealize Automation REST APIs
    • Approval Service / vRealize Automation REST APIs
    • Branding Service / vRealize Automation REST APIs
    • Catalog Service / vRealize Automation REST APIs
    • Catalog Registry / vRealize Automation REST APIs
    • EventLog Service / vRealize Automation REST APIs
    • Files Service / vRealize Automation REST APIs
    • Identity Service / vRealize Automation REST APIs
    • Licensing Service / vRealize Automation REST APIs
    • Management Service / vRealize Automation REST APIs
    • Notification Service / vRealize Automation REST APIs
    • Plug-in Service / vRealize Automation REST APIs
    • Portal Service / vRealize Automation REST APIs
    • Reservation Service / vRealize Automation REST APIs
    • vCO Service / vRealize Automation REST APIs
    • WorkItem Service / vRealize Automation REST APIs
  • return codes
    • defining / Introducing REST APIs
    • success codes / Introducing REST APIs
    • user error codes / Introducing REST APIs
  • rule
    • about / Cmdlets related to policy backup and migration

S

  • SAPIEN PowerShell Studio
    • using / Using SAPIEN PowerShell Studio
  • scripting
    • history / The history of scripting
  • Scripting language
    • URL / The history of scripting
  • scripts
    • running / Running and scheduling scripts
    • scheduling / Running and scheduling scripts
    • testing, Pester used / Testing your scripts using Pester
  • Security Hardening Script
    • defining / Security Hardening Script
    • URL / Security Hardening Script
  • security policy
    • cmdlets, defining / Configuring the security policy
  • Set-OMAlert cmdlet
    • URL / Managing vRealize Operations Manager
  • Set-Strictmode
    • URL / Implementing programming constructs in PowerShell
  • shared catalog items
    • listing / Listing shared and private catalog items
  • shared repository model
    • about / The shared repository model
  • Shell scripts
    • using / The history of scripting
  • snap-ins and modules, vCloud PowerCLI package
    • VMware.VimAutomatio n.Cloud / The vCloud PowerCLI package
    • VMware.VimAutomatio n.PCloud / The vCloud PowerCLI package
  • snap-ins and modules, vSphere PowerCLI package
    • VMware.VimAutomation.Core / The vSphere PowerCLI package
    • VMware.VimAutomation.Vds / The vSphere PowerCLI package
    • VMware.VimAutomation.Cis.Core / The vSphere PowerCLI package
    • VMware.VimAutomation.Storage / The vSphere PowerCLI package
    • VMware.VimAutomation.HA / The vSphere PowerCLI package
    • VMware.VimAutomation.License / The vSphere PowerCLI package
    • VMware.ImageBuilder / The vSphere PowerCLI package
    • VMware.DeployAutomation / The vSphere PowerCLI package
  • software depot
    • about / Image Builder with PowerCLI
  • SRM advanced configurations
    • managing / Managing SRM advanced configurations
  • standard switches
    • cmdlets / Managing port groups
  • storage device
    • representing / Managing datastores
  • storage policy-based management
    • used, for managing storage / Managing storage using storage policy-based management
    • cmdlets, related to policy rules / Cmdlets related to policy rules
    • cmdlets, related to storage policy / Cmdlets related to storage policy
    • cmdlets, related to Spbm capabilities and compatible storage / Cmdlets related to Spbm capabilities and compatible storage
    • cmdlets, related to policy application / Cmdlets related to policy application
    • cmdlets, related to policy backup and migration / Cmdlets related to policy backup and migration
  • Sublime Text 3
    • URL / Sublime Text
  • switch case examples
    • URL / Conditional logic
  • Switch parameters
    • defining / Switch parameters

T

  • teaming policy
    • cmdlets, defining / Configuring the teaming policy
  • templates
    • managing / Managing templates
  • tenant
    • managing / Managing tenants
    • creating / Creating a tenant
    • identity stores, listing for / Listing identity stores for a tenant
    • identity store, linking to / Linking an identity store to a tenant
  • test-driven development (TDD)
    • about / Testing your scripts using Pester
  • traffic shaping
    • cmdlets, defining / Configuring traffic shaping
  • trap keyword
    • about / Error handling in PowerShell
  • try block
    • about / Error handling in PowerShell

U

  • Uniform Resource Locators (URLs)
    • about / Introducing REST APIs
    • reference / Introducing REST APIs

V

  • vApps
    • managing / Managing vApps
    • cmdlets, defining / Managing vApps
  • vCenter logical constructs
    • configuring / Configuring vCenter logical constructs
    • folder / Folder
    • datacenter / Datacenter
    • cluster / Cluster
  • vCenter server
    • hosts, adding to / Adding hosts to a vCenter server
  • vCenter Site Recovery Manager
    • managing / Managing vCenter Site Recovery Manager
  • vCloud Air
    • managing / Managing vCloud Air
  • vCloud PowerCLI package
    • defining / The vCloud PowerCLI package
  • version control
    • using, with GitHub / Using version control with GitHub
  • vFLASH
    • configuring, PowerCLI extensions used / Configuring vFLASH using PowerCLI Extensions
  • VIB
    • about / Image Builder with PowerCLI
  • virtual machines
    • managing / Creating virtual machines
    • modifying / Modifying virtual machines
    • hard disks / Hard disks
    • network adapters, managing / Network adapters and USB devices
    • USB devices / Network adapters and USB devices
    • passthrough devices / Passthrough devices
    • snapshots / Snapshots
    • resource configuration / Resource configuration and policies
    • policies, defining / Resource configuration and policies
    • VMware tools, managing / Managing VMware tools in a VM
  • virtual SAN
    • configuring / Configuring virtual SAN
  • VMFS resignaturing
    • applying / Applying VMFS resignaturing
  • VM guest
    • cmdlets, using / Managing vCloud Air
  • VMware
    • URL / Managing datastores
  • VMware KB Article 1014953
    • URL / Managing datastores
  • VMware KB Article 2009226
    • URL / Using Raw Device Mapping
  • VMware official blog
    • URL / Managing vRealize Operations Manager
    • references / Managing vRealize Operations Manager
  • vRA token
    • authenticating / Authenticating and getting a vRA token
    • obtaining / Authenticating and getting a vRA token
  • vRealize Automation (vRA)
    • about / vRealize Automation REST APIs
    • URL / vRealize Automation REST APIs
  • vRealize Automation (vRA) REST APIs
    • defining / vRealize Automation REST APIs
  • vRealize Operations Manager
    • managing / Managing vRealize Operations Manager
    • URL / Managing vRealize Operations Manager
  • vROps environment
    • cmdlets, defining / Managing vRealize Operations Manager
  • VSAN
    • about / Configuring Distributed Power Management
  • vSphere API
    • using / Using the vSphere API
    • URL / Using the vSphere API
  • vSphere distributed switches
    • managing / Managing vSphere distributed switches
    • cmdlets / Managing vSphere distributed switches
  • vSphere network I/O control
    • configuring / Configuring vSphere network I/O control
  • vSphere PowerCLI package
    • defining / The vSphere PowerCLI package
  • vSphere scheduled task
    • creating / Creating a vSphere scheduled task
  • vSphere Security Hardening Guide
    • defining / The vSphere Security Hardening Guide
    • URL / The vSphere Security Hardening Guide
  • vSphere standard switches
    • managing / Managing vSphere standard switches
  • vSphere Update Manager
    • managing / Managing vSphere Update Manager
    • cmdlets, defining / Managing vSphere Update Manager

W

  • -Whatif option
    • about / Error handling in PowerShell
  • white box testing
    • about / Testing your scripts using Pester
    • URL / Testing your scripts using Pester
  • Windows Forms
    • about / Different ways to create a Windows GUI
  • Windows GUI
    • creating / Different ways to create a Windows GUI
  • Windows Presentation Foundation (WPF)
    • about / Different ways to create a Windows GUI
  • Write-Log function
    • URL / Security Hardening Script
  • Write-Verbose
    • about / Error handling in PowerShell

X

  • $xmlWindow
    • URL / Building GUI using WPF
  • XML
    • and JSON, comparing / Introducing JSON
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images