PowerCLI What’s New?
Administrating with the CLI Was Never Easier
Alan Renouf, VMware
VSVC5931
#VSVC5931
2
Agenda
 PowerCLI Overview
 Introducing PowerCLI 5.5 R1
 Tag Cmdlets
 VDS Cmdlets
 Open VM Console Cmdlet
 Somethin...
3
Introduction
Alan Renouf - Sr. Technical Marketing Architect, VMware
Automation: PowerCLI
VMware Blog: http://blogs.vmwa...
4
PowerCLI Overview
5
PowerCLI – Overview
 PowerCLI Overview
• A free product containing over 370+ cmdlets (PowerShell Commands) to use
• Man...
6
PowerCLI Snap-in’s
 Core
• Managing vSphere
 Image Builder
• Working with Image Profiles
 Auto Deploy
• Deploying ESX...
7
 PowerCLI Cmdlet syntax
• All cmdlets use a Verb-Noun syntax, examples are:
PowerCLI – Overview
Get-VM (Lists all VMs) ...
8
Getting Started Demo
DEMO
9
Introducing PowerCLI 5.5 R1
10
PowerCLI 5.5 R1 Overview
New Cmdlets to manage vSphere Tags
 Manage Tags in the vSphere environment
 Assign Tags to v...
11
Tag Cmdlets Deeper Dive
12
What are Tags?
13
Inventory Object – Tagging
 Ability to create custom tags on inventory objects
 Associate an arbitrary set of objects...
14
Tags vs Folders
VM
NYC VMs
Finance VMs
VM
VM
VM
VM
VM
VM
VM
VM
VM
VM
VM
Cannot do this
with folders
Tag:
NYC_VM
Tag:
Fi...
15
Currently the Only Programmatic Way to Manipulate Tags
Get-VM/VMHost/Datastore/VirtualPortGroup/VDPortGroup have tag pa...
16
Manipulating Tags
New-TagAssignment
Assign the "MyTag" tag to all virtual machines whose name
contains the "*myvm*" wil...
17
Tag Demo
DEMO
18
VDS Cmdlets Deeper Dive
19
What's New in the VDS Snap-in?
 Introduced basic cmdlets in PowerCLI 5.1 R2
 VDS snap-in now includes over 30 Cmdlets...
20
VDS Migration
VDS Migration
Add-VDSwitchPhysicalNetworkAdatper
• Modified to accept virtual nics to be
migrated togethe...
21
VDS Configuration
VDSwitchPrivateVlan
Get/New/Remove-VDSwitchPrivateVlan
• Added for managing private VLANs
VDS Policy
...
22
VDS Configuration
VDVlanConfiguration
Set-VLanConfiguration
• Added for managing VLAN configuration
VDPort
Get/Set-VDPo...
23
New VDS Cmdlets Demo
DEMO
24
Open-VMConsoleWindow
25
Open VM Console Window
 New Cmdlet to work with VM Consoles
 Opens a VM Console in a web browser
• Default browser us...
26
Open-VMConsoleWindow Demo
DEMO
27
Something Special
28
PowerCLI Summary
 Additional Resources
• PowerCLI Blog - http://blogs.vmware.com/vipowershell/
• PowerCLI Download - h...
29
Further Reading
30
QA – Thank You for Attending
Tweet a comment about this session to win
@alanrenouf and #VSVC5931
Winners will be tweete...
31
Other VMware Activities Related to This Session
 HOL:
HOL-SDC-1307
vCloud Automation Solutions
 Group Discussions:
VS...
THANK YOU
PowerCLI What’s New? Administrating with the CLI
Was Never Easier
Alan Renouf, VMware
VSVC5931
#VSVC5931
VMworld 2013: PowerCLI What’s New? Administrating with the CLI Was Never Easier
Upcoming SlideShare
Loading in …5
×

VMworld 2013: PowerCLI What’s New? Administrating with the CLI Was Never Easier

603 views

Published on

VMworld 2013

Alan Renouf, VMware

Learn more about VMworld and register at http://www.vmworld.com/index.jspa?src=socmed-vmworld-slideshare

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
603
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

VMworld 2013: PowerCLI What’s New? Administrating with the CLI Was Never Easier

  1. 1. PowerCLI What’s New? Administrating with the CLI Was Never Easier Alan Renouf, VMware VSVC5931 #VSVC5931
  2. 2. 2 Agenda  PowerCLI Overview  Introducing PowerCLI 5.5 R1  Tag Cmdlets  VDS Cmdlets  Open VM Console Cmdlet  Something Special!
  3. 3. 3 Introduction Alan Renouf - Sr. Technical Marketing Architect, VMware Automation: PowerCLI VMware Blog: http://blogs.vmware.com/vipowershell/ Personal Blog: http://virtu-al.net/ Twitter: @alanrenouf
  4. 4. 4 PowerCLI Overview
  5. 5. 5 PowerCLI – Overview  PowerCLI Overview • A free product containing over 370+ cmdlets (PowerShell Commands) to use • Manage every aspect of: • VMware vSphere • VMware vCenter Server • VMware vCloud Director • VMware View • VMware Update Manager • Integrated into Windows PowerShell • Designed towards system administrators not developers • Installed by default from Windows 2008/Windows 7 (XP/2003 requires download) • Extending the existing PowerShell knowledge of Windows Admin • Easily integrated with other Microsoft, VMware and 3rd Party Snapins PowerCLI is backward compatible all the way to ESX 4.0/ Virtual Center 4.0
  6. 6. 6 PowerCLI Snap-in’s  Core • Managing vSphere  Image Builder • Working with Image Profiles  Auto Deploy • Deploying ESXi via PXE  License • Working with vSphere Licensing  VDS • Working with vSphere Distributed Switch  Cloud • vCloud Director Providers  Tenant • vCloud Director Tenants Core Image Builder Auto Deploy License Cloud Tenant VDS
  7. 7. 7  PowerCLI Cmdlet syntax • All cmdlets use a Verb-Noun syntax, examples are: PowerCLI – Overview Get-VM (Lists all VMs) Get-Datastore (Lists all Datastores) New-VM (Creates new VMs) Start-VM (Powers on VMs) New-VMHost (Adds Hosts) Stop-VM (Powers off a VMs) Set-Snapshot (alters snapshot information) Remove-VMHost (Removes Hosts) New-Datatsore (Creates new Datastores) Remove-Cluster (Removes Clusters)  Built-in cmdlet help and examples • Available from the PowerCLI prompt via Get-Help and online • Examples of common tasks by using Get-Help cmdletname –Examples  “Piping” • Allows the output of one cmdlet to be used by another • Powerful one-line code solutions Get-Cluster Cluster1 | Get-VM
  8. 8. 8 Getting Started Demo DEMO
  9. 9. 9 Introducing PowerCLI 5.5 R1
  10. 10. 10 PowerCLI 5.5 R1 Overview New Cmdlets to manage vSphere Tags  Manage Tags in the vSphere environment  Assign Tags to vSphere Objects  Remove Tag assignments from vSphere Objects VDS  Easy VDS Migration  Manage Private VLANs  Manage VDS Policies  Manage VDS Ports VM Console  Open a console for vSphere/vCloud VM  Open multiple consoles at once  Output the URL to open VM Consoles vCloud Director 5.5 Support  Support for vCD 5.5 Host Licensing  Assign Host Licensing
  11. 11. 11 Tag Cmdlets Deeper Dive
  12. 12. 12 What are Tags?
  13. 13. 13 Inventory Object – Tagging  Ability to create custom tags on inventory objects  Associate an arbitrary set of objects of the same type using a tag • Search for objects by that tag • Enables the business case where customers want to create arbitrary groups of VMS, Clusters, Datastores for ease of management • Storage PBM uses tagging to make placement decisions  Inventory objects can have multiple tags associated with it • Assists Folder limitations of one folder per inventory object • Ability to assign permissions based on tags to come later
  14. 14. 14 Tags vs Folders VM NYC VMs Finance VMs VM VM VM VM VM VM VM VM VM VM VM Cannot do this with folders Tag: NYC_VM Tag: Finance_VM • Assign multiple tags to same VM • Search VM inventory using tags
  15. 15. 15 Currently the Only Programmatic Way to Manipulate Tags Get-VM/VMHost/Datastore/VirtualPortGroup/VDPortGroup have tag parameter Return all VMs with a tag of “Gold". Get-VM –Tag Gold Get-Tag Return all tags named "MyTag". Get-Tag -Name MyTag Return all tags from the "MyCategory1" and "" categories, named "MyTag". MyCategory2 Get-Tag -Category MyCategory1, MyCategory2 -Name MyTag Get-TagAssignment Retrieve all tag assignments for the $datastore entity that have tags from the "MyCategory" category. $myDatastore = Get-DataStore MyDatastore Get-TagAssignment -Entity $datastore -Category MyCategory
  16. 16. 16 Manipulating Tags New-TagAssignment Assign the "MyTag" tag to all virtual machines whose name contains the "*myvm*" wildcard pattern. $myTag = Get-Tag MyTag $myVM = Get-VM '*myvm*' New-TagAssignment -Tag $myTag -Entity $myVM Remove-TagAssignment Remove all connections to tags from the specified virtual machine entity. $myVM = Get-VM myvm $myTagAssignment = Get-TagAssignment $myVM Remove-TagAssignment $myTagAssignment
  17. 17. 17 Tag Demo DEMO
  18. 18. 18 VDS Cmdlets Deeper Dive
  19. 19. 19 What's New in the VDS Snap-in?  Introduced basic cmdlets in PowerCLI 5.1 R2  VDS snap-in now includes over 30 Cmdlets for managing vSphere Distributed Switches In 5.5 R1 we have new additions for:  VDS Migration  VDS Private VLANs  VDS Policy’s  VD VLAN Configuration  VD Port
  20. 20. 20 VDS Migration VDS Migration Add-VDSwitchPhysicalNetworkAdatper • Modified to accept virtual nics to be migrated together with the physical nics Add-VirtualSwitchPhysicalNetworkAdapter • Added to allow attaching/migrating physical and virtual nics to virtual standard switch
  21. 21. 21 VDS Configuration VDSwitchPrivateVlan Get/New/Remove-VDSwitchPrivateVlan • Added for managing private VLANs VDS Policy Get and Set cmdlets added for managing VDS Policies • VDUplinkTeamingPolicy • VDBlockedPolicy • VDPortGroupOverridePolicy • VDSecurityPolicy • VDTrafficShapingPolicy • VDUplinkLacpPolicy
  22. 22. 22 VDS Configuration VDVlanConfiguration Set-VLanConfiguration • Added for managing VLAN configuration VDPort Get/Set-VDPort • Added for managing VDPorts
  23. 23. 23 New VDS Cmdlets Demo DEMO
  24. 24. 24 Open-VMConsoleWindow
  25. 25. 25 Open VM Console Window  New Cmdlet to work with VM Consoles  Opens a VM Console in a web browser • Default browser used • Configure different browser via Set-PowerCLIConfiguration  Works with vSphere and vCloud Director VMs  -URLOnly parameter • Returns a URL to the screen as a string • The URL is valid for 30 seconds. After 30 seconds, the screen authentication ticket contained in the URL expires Open the console of the specified virtual machine in full screen mode Get-VM myVM | Open-VMConsoleWindow -FullScreen
  26. 26. 26 Open-VMConsoleWindow Demo DEMO
  27. 27. 27 Something Special
  28. 28. 28 PowerCLI Summary  Additional Resources • PowerCLI Blog - http://blogs.vmware.com/vipowershell/ • PowerCLI Download - http://vmware.com/go/PowerCLI • PowerCLI Documentation - http://vmware.com/support/developer/PowerCLI/ • Detailed PowerCLI cmdlet reference with examples - http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/index.html • PowerCLI Community - http://communities.vmware.com/community/vmtn/server/vsphere/automationto ols/powercli?view=discussions • vSphere Automation Blog - http://blogs.vmware.com/vsphere/automation/ • Luc Dekens Blog – http://Lucd.info • Alan Renoufs Blog – http://virtu-al.net • Google ”PowerCLI”
  29. 29. 29 Further Reading
  30. 30. 30 QA – Thank You for Attending Tweet a comment about this session to win @alanrenouf and #VSVC5931 Winners will be tweeted back by me during VMworld
  31. 31. 31 Other VMware Activities Related to This Session  HOL: HOL-SDC-1307 vCloud Automation Solutions  Group Discussions: VSVC1005-GD PowerCLI and Automation with Alan Renouf
  32. 32. THANK YOU
  33. 33. PowerCLI What’s New? Administrating with the CLI Was Never Easier Alan Renouf, VMware VSVC5931 #VSVC5931

×