Disclaimer This session may contain product features that are  currently under development. This session/overview of the n...
Managing VMware With PowerShell Carter Shanklin – Product Manager, VMware Andrey Anastasov – PowerShell Architect, VMware ...
My goal today is simple. <ul><li>Convince  you  that </li></ul><ul><li>any  serious  VMware admin </li></ul><ul><li>MUST k...
Not convinced? <ul><li>To prove this I will: </li></ul><ul><ul><li>Introduce The VI Toolkit for Windows. </li></ul></ul><u...
Introducing The VI Toolkit (for Windows). <ul><li>The VI Toolkit for Windows simplifies large-scale management. </li></ul>...
What is PowerShell? <ul><li>PowerShell is Microsoft’s new foundation for management. </li></ul><ul><ul><li>PowerShell supp...
What does PowerShell look like? <ul><li>PowerShell is centered around cmdlets. </li></ul><ul><ul><li>Cmdlets are provided ...
Top 3 ways your life gets better with the Toolkit. <ul><ul><li>Save time by automating repetitive tasks. 100 is just as ea...
<ul><li>Disconnect CD-ROM and floppy drives to enable VMotion. </li></ul>Automate Repetitive Tasks. PowerShell: 2 Commands...
<ul><li>Cloning a VM many times can take forever. </li></ul>Save time: Attack of the clones. PowerShell: As little as 1 co...
<ul><li>A customer needed to create secondary service consoles on 400+ hosts. </li></ul>The story you are about to witness...
A tour of the toolkit. <ul><li>VM Lifecycle: </li></ul><ul><ul><li>New-VM, Start-VM, Set-VM </li></ul></ul><ul><li>Snapsho...
VI Toolkit types tag cloud. The focus is on VM and ESX Management, But you can manage all aspects of VI with the toolkit.
Incredibly Powerful Examples: <ul><li>Snapshot every VM you have: </li></ul><ul><ul><li>Get-VM | New-Snapshot –Name “New S...
More Incredibly Powerful Examples: <ul><li>Ensure all your VMs have at least 1GB of RAM: </li></ul><ul><ul><li>Get-VM | Wh...
As if that weren’t enough! <ul><li>Rescan every HBA on all hosts: </li></ul><ul><ul><li>Get-VMHost | Get-VMHostStorage -Re...
A Tour of Available Resources. <ul><li>The VI Toolkit (for Windows) Community. </li></ul><ul><ul><li>A very active communi...
Announcing The VI Toolkit Community Extensions. <ul><li>The VI Toolkit Community Extensions: </li></ul><ul><ul><li>A modul...
What can you learn through these resources? <ul><li>Among other things you can learn to: </li></ul><ul><ul><li>Change the ...
What to expect in the future. <ul><li>Even better VI management. </li></ul><ul><ul><li>We’ll continue to make the VI admin...
Don’t be a script-o-phobe! <ul><li>PowerGUI Script Editor makes writing scripts easy. </li></ul><ul><ul><li>Syntax highlig...
DEMO
Convinced? Get the toolkit today! http://vmware.com/go/powershell
Q&A Breakout Session #AD2764 Carter Shanklin Additional Information Product Manager, VMware Inc. http://vmware.com/go/powe...
Upcoming SlideShare
Loading in...5
×

Managing VMware with PowerShell - VMworld 2008

6,014

Published on

This is the slide deck I used during my talk "Managing VMware with PowerShell" at VMworld 2008. Some video snippets of the presentation are also available at http://communities.vmware.com/thread/169066

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

No Downloads
Views
Total Views
6,014
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
219
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • (All VMware employees must include this slide)
  • Managing VMware with PowerShell - VMworld 2008

    1. 1. Disclaimer This session may contain product features that are currently under development. This session/overview of the new technology represents no commitment from VMware to deliver these features in any generally available product. Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind. Technical feasibility and market demand will affect final delivery. Pricing and packaging for any new technologies or features discussed or presented have not been determined. “ These features are representative of feature areas under development. Feature commitments are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind. Technical feasibility and market demand will affect final delivery.”
    2. 2. Managing VMware With PowerShell Carter Shanklin – Product Manager, VMware Andrey Anastasov – PowerShell Architect, VMware Dmitry Sotnikov – Manager and Microsoft MVP, Quest Software
    3. 3. My goal today is simple. <ul><li>Convince you that </li></ul><ul><li>any serious VMware admin </li></ul><ul><li>MUST know </li></ul><ul><li>the VI Toolkit for Windows. </li></ul>
    4. 4. Not convinced? <ul><li>To prove this I will: </li></ul><ul><ul><li>Introduce The VI Toolkit for Windows. </li></ul></ul><ul><ul><li>Show you the top 3 ways the Toolkit makes your life easier. </li></ul></ul><ul><ul><li>Show you lots of samples as well as the resources available. </li></ul></ul><ul><ul><li>Demonstrate how PowerGUI can help you get started. </li></ul></ul><ul><ul><li>Tell you how to get the toolkit so you can get started today. </li></ul></ul>
    5. 5. Introducing The VI Toolkit (for Windows). <ul><li>The VI Toolkit for Windows simplifies large-scale management. </li></ul><ul><ul><li>Get a handle on VM sprawl or out-of-control snapshots through automation. </li></ul></ul><ul><li>It’s a scripting tool, based on PowerShell. </li></ul><ul><li>It’s easy to use. </li></ul><ul><ul><li>Many useful actions require 0 scripting. </li></ul></ul><ul><li>It provides 125 powerful cmdlets. </li></ul><ul><ul><li>Covers all aspects of Virtual Infrastructure management. </li></ul></ul><ul><li>It’s completely FREE! </li></ul>
    6. 6. What is PowerShell? <ul><li>PowerShell is Microsoft’s new foundation for management. </li></ul><ul><ul><li>PowerShell support is required for all Microsoft Server apps. </li></ul></ul><ul><ul><li>Manages different applications in a consistent way. </li></ul></ul><ul><ul><li>Chances are, you are learning it or planning to learn it. </li></ul></ul>
    7. 7. What does PowerShell look like? <ul><li>PowerShell is centered around cmdlets. </li></ul><ul><ul><li>Cmdlets are provided to do all sorts of tasks. </li></ul></ul><ul><ul><li>More cmdlets can be added with 3 rd party snapins. </li></ul></ul><ul><ul><li>Cmdlets can be strung together using pipelines. </li></ul></ul><ul><li>PowerShell cmdlets use common conventions. </li></ul><ul><ul><li>Cmdlets follow the Verb-Noun convention. </li></ul></ul><ul><ul><ul><li>Example: Get-Process. </li></ul></ul></ul><ul><ul><li>This tends to lead to commands that follow our thinking. </li></ul></ul><ul><ul><ul><li>Example: Get-Process notepad | Stop-Process </li></ul></ul></ul><ul><li>PowerShell is object-oriented. </li></ul><ul><ul><li>No more text parsing! </li></ul></ul>
    8. 8. Top 3 ways your life gets better with the Toolkit. <ul><ul><li>Save time by automating repetitive tasks. 100 is just as easy as 1. </li></ul></ul><ul><ul><li>Automate time consuming tasks for greater productivity. Let your scripts do the waiting. </li></ul></ul><ul><ul><li>Turn questions into answers with our large and growing set of online resources. </li></ul></ul>
    9. 9. <ul><li>Disconnect CD-ROM and floppy drives to enable VMotion. </li></ul>Automate Repetitive Tasks. PowerShell: 2 Commands Full Automation Manually: 1 Minute / VM BORING!
    10. 10. <ul><li>Cloning a VM many times can take forever. </li></ul>Save time: Attack of the clones. PowerShell: As little as 1 command Full Automation Manually: 10 Min+ / VM BORING!
    11. 11. <ul><li>A customer needed to create secondary service consoles on 400+ hosts. </li></ul>The story you are about to witness is real. PowerShell: Automated, with forum support. Manually: 400 Hosts 20+ Hours
    12. 12. A tour of the toolkit. <ul><li>VM Lifecycle: </li></ul><ul><ul><li>New-VM, Start-VM, Set-VM </li></ul></ul><ul><li>Snapshots: </li></ul><ul><ul><li>Get-Snapshot, New-Snapshot, Set-VM </li></ul></ul><ul><li>Templates and Customization Specs: </li></ul><ul><ul><li>New-Template, New-OSCustomizationSpec, New-VM </li></ul></ul><ul><li>Virtual Switches: </li></ul><ul><ul><li>New-VirtualSwitch, New-VirtualPortGroup, Set-VirtualSwitch </li></ul></ul><ul><li>Performance Statistics and Monitoring: </li></ul><ul><ul><li>Get-Stat </li></ul></ul><ul><li>125 cmdlets in total. </li></ul>
    13. 13. VI Toolkit types tag cloud. The focus is on VM and ESX Management, But you can manage all aspects of VI with the toolkit.
    14. 14. Incredibly Powerful Examples: <ul><li>Snapshot every VM you have: </li></ul><ul><ul><li>Get-VM | New-Snapshot –Name “New Snapshot” </li></ul></ul><ul><li>Find all snapshots older than 1 month: </li></ul><ul><ul><li>Get-VM | Get-Snapshot | </li></ul></ul><ul><ul><li>Where { $_.Created –lt (Get-Date).addMonths(-1) } </li></ul></ul><ul><li>Change every VM on Network A to Network B: </li></ul><ul><ul><li>Get-VM | Get-NetworkAdapter | </li></ul></ul><ul><ul><li>where { $_.NetworkName –eq “Network A” } | </li></ul></ul><ul><ul><li>Set-NetworkAdapter –NetworkName B </li></ul></ul>
    15. 15. More Incredibly Powerful Examples: <ul><li>Ensure all your VMs have at least 1GB of RAM: </li></ul><ul><ul><li>Get-VM | Where { $_.MemoryMB –lt 1024 } | </li></ul></ul><ul><ul><li>Set-VM –MemoryMB 1024 </li></ul></ul><ul><li>Update VMware Tools in every VM in the “Americas 1” datacenter: </li></ul><ul><ul><li>Get-Datacenter “Americas 1” | Get-VM | Update-Tools </li></ul></ul><ul><li>Restart an unresponsive VirtualCenter agent: </li></ul><ul><ul><li>Get-VMHost badhost | Get-VMHostService | </li></ul></ul><ul><ul><li>Where { $_.key –eq “vmware-vpxa” } | </li></ul></ul><ul><ul><li>Restart-VMHostService </li></ul></ul>
    16. 16. As if that weren’t enough! <ul><li>Rescan every HBA on all hosts: </li></ul><ul><ul><li>Get-VMHost | Get-VMHostStorage -RescanAllHba </li></ul></ul><ul><li>Ensure your VMs will all start after ESX is restarted: </li></ul><ul><ul><li>Get-VMHostStartPolicy |Set-VMHostStartPolicy -enabled:$true </li></ul></ul><ul><ul><li>Get-VM | Get-VMStartPolicy | </li></ul></ul><ul><ul><li>Set-VMStartPolicy -StartAction poweron </li></ul></ul><ul><li>Move every VM on host A to host B: </li></ul><ul><ul><li>Get-VMHost A | Get-VM | </li></ul></ul><ul><ul><li>Move-VM –destination (Get-VMHost B) </li></ul></ul>
    17. 17. A Tour of Available Resources. <ul><li>The VI Toolkit (for Windows) Community. </li></ul><ul><ul><li>A very active community with lots of very smart people. </li></ul></ul><ul><ul><li>Over 300 examples to guide you. </li></ul></ul><ul><li>The VI Toolkit (for Windows) FAQ. </li></ul><ul><ul><li>40 frequently asked questions with answers. </li></ul></ul><ul><ul><li>Plenty of sample code. </li></ul></ul><ul><li>The VI Toolkit (for Windows) Blog. </li></ul><ul><ul><li>Lots of examples and ideas. </li></ul></ul><ul><ul><li>Updated regularly. </li></ul></ul><ul><li>All available from http://vmware.com/go/powershell </li></ul>
    18. 18. Announcing The VI Toolkit Community Extensions. <ul><li>The VI Toolkit Community Extensions: </li></ul><ul><ul><li>A module that can be loaded into your scripts. </li></ul></ul><ul><ul><li>Open source. </li></ul></ul><ul><ul><li>A way for us to make all of the good ideas in our forums more accessible. </li></ul></ul><ul><ul><li>Uses scripts so everyone can contribute. </li></ul></ul><ul><ul><li>A “first line” for new functionality. </li></ul></ul><ul><li>Download it at http://codeplex.com/vitoolkitextensions </li></ul>
    19. 19. What can you learn through these resources? <ul><li>Among other things you can learn to: </li></ul><ul><ul><li>Change the VMware tools upgrade policy. </li></ul></ul><ul><ul><li>List all storage world wide names. </li></ul></ul><ul><ul><li>Register unregistered VMs. </li></ul></ul><ul><ul><li>Create reports. </li></ul></ul><ul><ul><li>Customize VM hardware. </li></ul></ul><ul><ul><li>Remotely power ESX hosts on and off. </li></ul></ul><ul><ul><li>Configure NTP. </li></ul></ul><ul><ul><li>Execute scripts in response to VirtualCenter alarms. </li></ul></ul><ul><ul><li>Much, much more! </li></ul></ul>
    20. 20. What to expect in the future. <ul><li>Even better VI management. </li></ul><ul><ul><li>We’ll continue to make the VI admin’s life easy. </li></ul></ul><ul><li>Support for more VMware products. </li></ul><ul><ul><li>Products that complement and extend VMware VI. </li></ul></ul><ul><li>Improved VMware PowerShell Community Extensions. </li></ul><ul><ul><li>This will hold a large library of cmdlets of all different types. </li></ul></ul><ul><ul><li>Share your own ideas and help us build this community. </li></ul></ul>
    21. 21. Don’t be a script-o-phobe! <ul><li>PowerGUI Script Editor makes writing scripts easy. </li></ul><ul><ul><li>Syntax highlighting. </li></ul></ul><ul><ul><li>Name completion. </li></ul></ul><ul><li>PowerGUI Admin Console generates code for you! </li></ul><ul><ul><li>No more “I’ve been meaning to get around to it”. </li></ul></ul>
    22. 22. DEMO
    23. 23. Convinced? Get the toolkit today! http://vmware.com/go/powershell
    24. 24. Q&A Breakout Session #AD2764 Carter Shanklin Additional Information Product Manager, VMware Inc. http://vmware.com/go/powershell 9/16/2008
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×