SlideShare uma empresa Scribd logo
1 de 20
PowerCLI for the
PowerShell Inclined
Josh Atwell
vtesseract.com
#vBrownBag Podcast
@Josh_Atwell
#RTPSUG / @RTPSUG
@josh_atwell - @rtpsug
Get-Agenda
•
•
•
•
•
•

What is PowerCLI
Getting Started
Managing vSphere Environment
Get-View and .ExtensionData
Managing Update Manager (VUM)
Project Onyx

@josh_atwell - @rtpsug
What is PowerCLI
www.vmware.com/go/powercli
Windows PowerShell for VMware
Virtual Infrastructure and
components
PowerCLI Admin Guide

@josh_atwell - @rtpsug
PowerCLI Capabilities

@josh_atwell - @rtpsug
First Commands
Get-PowerCLIConfiguration

Set-PowerCLIConfiguration –DefaultVIServerMode „multiple‟

Get-PowerCLIVersion

@josh_atwell - @rtpsug
Connecting
Connect-VIServer
$cred = Get-Credential
Connect-VIserver –Credential $cred

Multiple Ways to Connect
Connect-VIserver –AllLinked
Connect-Viserver –Menu
$DefaultVIServer
@josh_atwell - @rtpsug
Get-View
• Returns the vSphere .Net view
objects
• Filters!
• Methods

• Check out vNugglets.com
@josh_atwell - @rtpsug
Get-View Filters
$filter = @{“Name” = “VMName”}
Get-View –ViewType “VirtualMachine” –Filter
$filter

@josh_atwell - @rtpsug
Get-View and Methods
Test-vMotion
$si = Get-View ServiceInstance -Server $global:DefaultVIServer
$VmProvCheck = get-view $si.Content.VmProvisioningChecker
$result = $VmProvCheck.CheckMigrate( $vmMoRef, $hsMoRef, $pool,
$null, $null )

VM MoRefID

Host MoRefID

@josh_atwell - @rtpsug

Resource Pool
MoRefID
.ExtensionData
Let‟s say you need a VM and what
host and MoRef that VM is on
$vm.Vmhost
$vm.ExtensionData.MoRef.Value
$vm.ExtensionData.ResourcePool.Value

@josh_atwell - @rtpsug
Browse Datastores - Hard
Use of PSDrives for browsing datastores

$datastore = Get-Datastore “Name”
$psdrivename = $datastore.name
New-PSDrive -Name $psdrivename -PSProvider
VimDatastore -Root / -Location $datastore
Get-Childitem ($psdrivename + “:/”)
Remove-PSdrive -name $psdrivename Confirm:$false

@josh_atwell - @rtpsug
Browse Datastores - Easy
• vi = Inventory of current VIServer
• vis = Inventory of All connected VIServers
• cd vi:
• dir (alias for Get-ChildItem)
– will give you what is in that root directory

• dir –recurse
– gives all objects including subfolders

P. 28 of PowerCLI Admin Guide

@josh_atwell - @rtpsug
Browse Folders - Easy
• vmstore:
• vmstores:
• cd vmstore:
• dir (get-childitem)
• dir –recurse | Select
Name, ItemType

P. 28 of PowerCLI Admin Guide
@josh_atwell - @rtpsug
Wider Management
•
•
•
•
•

VMware Update Manager
vCloud Director
View
AutoDeploy
Distributed Virtual Switch

@josh_atwell - @rtpsug
Update Manager (VUM)
NOTE: VUM Snap-in is version
specific. V5 snap-in does not
manage vSphere 4 Update Manager

• Locate Commands Quickly
– Get-VICommand *patch*
– Get-VICommand *baseline*
– Get-VICommand –PSSnapin
VMware.VumAutomation
@josh_atwell - @rtpsug
Project Onyx
Now supporting vSphere 5.5!!

@josh_atwell - @rtpsug
PowerCLI Community
Get-PowerCLICommunity
http://www.vbrownbag.com/
http://www.virtu-al.net/
http://www.lucd.info/
http://geekafterfive.com/
http://vnugglets.com/ (Get-View)

@josh_atwell - @rtpsug
Published Resources
VMware vSphere PowerCLI Reference
Alan Renouf, Luc Dekens, Glenn Sizemore,
Jonathan Medd, Arnim van Lieshout

Managing VMware Infrastructure
with Windows PowerShell
Hal Rottenberg

VMware vSphere
PowerCLI
Hal Rottenberg
PluralSight

@josh_atwell - @rtpsug
Published Resources
Mastering vSphere 5.5
Scott Lowe, Nick Marshall, Forbes Guthrie, Matt
Liebowitz, Josh Atwell

Learning PowerCLI
Robert van den Nieuwendijk

@josh_atwell - @rtpsug

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
 
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
 
Ansible
AnsibleAnsible
Ansible
 
AtlasCamp 2014: Building a Production Ready Connect Add-On
AtlasCamp 2014: Building a Production Ready Connect Add-OnAtlasCamp 2014: Building a Production Ready Connect Add-On
AtlasCamp 2014: Building a Production Ready Connect Add-On
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
 
Automate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleAutomate DBA Tasks With Ansible
Automate DBA Tasks With Ansible
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Ansible Case Studies
Ansible Case StudiesAnsible Case Studies
Ansible Case Studies
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxy
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
 
Kube-AWS
Kube-AWSKube-AWS
Kube-AWS
 
Cyansible
CyansibleCyansible
Cyansible
 
Packer
PackerPacker
Packer
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
 
Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2
 
A journey-to-a-button
A journey-to-a-buttonA journey-to-a-button
A journey-to-a-button
 

Destaque

Destaque (6)

#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation Datacenter#DFWVMUG - Automating the Next Generation Datacenter
#DFWVMUG - Automating the Next Generation Datacenter
 
vBrownBag US - What's New in vSphere 6 Automation
vBrownBag US - What's New in vSphere 6 AutomationvBrownBag US - What's New in vSphere 6 Automation
vBrownBag US - What's New in vSphere 6 Automation
 
Managing the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShellManaging the Infrastructure Stack with PowerShell
Managing the Infrastructure Stack with PowerShell
 
Architecting the Agile Career
Architecting the Agile CareerArchitecting the Agile Career
Architecting the Agile Career
 
Automating the Next Generation Datacenter
Automating the Next Generation DatacenterAutomating the Next Generation Datacenter
Automating the Next Generation Datacenter
 
VMUG Melbourne - DevOps - Not Just for Open Source and Unicorns
VMUG Melbourne - DevOps - Not Just for Open Source and UnicornsVMUG Melbourne - DevOps - Not Just for Open Source and Unicorns
VMUG Melbourne - DevOps - Not Just for Open Source and Unicorns
 

Semelhante a PowerCLI for the PowerShell Inclined

Automation using power cli
Automation using power cliAutomation using power cli
Automation using power cli
esarakaitis
 
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Mihai Criveti
 

Semelhante a PowerCLI for the PowerShell Inclined (20)

VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
 
Automation using power cli
Automation using power cliAutomation using power cli
Automation using power cli
 
VMworld 2015: Automating Everything VMware with PowerCLI- Deep Dive
VMworld 2015: Automating Everything VMware with PowerCLI- Deep DiveVMworld 2015: Automating Everything VMware with PowerCLI- Deep Dive
VMworld 2015: Automating Everything VMware with PowerCLI- Deep Dive
 
Powershell dcpp
Powershell dcppPowershell dcpp
Powershell dcpp
 
VMworld 2013: PowerCLI Best Practices - A Deep Dive
VMworld 2013: PowerCLI Best Practices - A Deep DiveVMworld 2013: PowerCLI Best Practices - A Deep Dive
VMworld 2013: PowerCLI Best Practices - A Deep Dive
 
CLI for VMware Distributed Switch (Community project)
CLI for VMware Distributed Switch (Community project)CLI for VMware Distributed Switch (Community project)
CLI for VMware Distributed Switch (Community project)
 
What's New in PowerCLI 5.0
What's New in PowerCLI 5.0What's New in PowerCLI 5.0
What's New in PowerCLI 5.0
 
The Practice of Alluxio in JD.com
The Practice of Alluxio in JD.comThe Practice of Alluxio in JD.com
The Practice of Alluxio in JD.com
 
2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL
 
Mettles journey towards throw away clusters (Cloud Native Nordics)
Mettles journey towards throw away clusters (Cloud Native Nordics)Mettles journey towards throw away clusters (Cloud Native Nordics)
Mettles journey towards throw away clusters (Cloud Native Nordics)
 
Hadoop 설치
Hadoop 설치Hadoop 설치
Hadoop 설치
 
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
 
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
Soyez le maître du PRA - MS Cloud Summit Paris 2017
Soyez le maître du PRA - MS Cloud Summit Paris 2017Soyez le maître du PRA - MS Cloud Summit Paris 2017
Soyez le maître du PRA - MS Cloud Summit Paris 2017
 
What's New in Docker 1.12?
What's New in Docker 1.12?What's New in Docker 1.12?
What's New in Docker 1.12?
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationPowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
 

Mais de Josh Atwell

Mais de Josh Atwell (6)

How to Be a Failure - DevOpsDays Raleigh
How to Be a Failure - DevOpsDays RaleighHow to Be a Failure - DevOpsDays Raleigh
How to Be a Failure - DevOpsDays Raleigh
 
Are you Being the Right Person for DevOps
Are you Being the Right Person for DevOps Are you Being the Right Person for DevOps
Are you Being the Right Person for DevOps
 
Adopting a Continual Improvement Mindset for IT
Adopting a Continual Improvement Mindset for ITAdopting a Continual Improvement Mindset for IT
Adopting a Continual Improvement Mindset for IT
 
Work + Family +Self + Fast Paced Industry = ¯\_(ツ)_/¯
Work + Family +Self + Fast Paced Industry = ¯\_(ツ)_/¯Work + Family +Self + Fast Paced Industry = ¯\_(ツ)_/¯
Work + Family +Self + Fast Paced Industry = ¯\_(ツ)_/¯
 
Using Infrastructure as an Accelerator of DevOps Maturity
Using Infrastructure as an Accelerator of DevOps MaturityUsing Infrastructure as an Accelerator of DevOps Maturity
Using Infrastructure as an Accelerator of DevOps Maturity
 
Automating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterAutomating the VMware Virtual Datacenter
Automating the VMware Virtual Datacenter
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

PowerCLI for the PowerShell Inclined