SlideShare a Scribd company logo
Managing Microsoft Hyper-V with PowerShellRavikanth Chaganti
About MeLead Engineer at DellWindows PowerShell MVPAuthor ofFree eBook: Layman’s guide to PowerShell 2.0 remotingFree eBook: WMI Query Language via PowerShell (coming soon)Co-author on Quest’s SharePoint 2010 & PowerShell cheat sheetBlog at http://www.ravichaganti.com/blog
AgendaPowerShell 2.0 featuresIntegrated Scripting EnvironmentPowerShell remotingPowerShell for Hyper-VHyper-V WMI – OverviewVirtual Machine ManagementVirtual Network ManagementVirtual Storage ManagementHyper-V PowerShell ModuleQ & A
PowerShell 2.0 FeaturesAdvanced FunctionsIntegrated Scripting EnvironmentRemotingBackground jobsEventingBetter error handling & debugging supportSeveral new cmdlets
Integrated Scripting Environment (ISE)Output PaneScript PaneCommand Pane
PowerShell RemotingEnables Universal Code Execution ModelWhatever runs locally should run anywhereUses Windows Remote ManagementSupports several remoting methodsInvoke-CommandInteractive remotingImplicit remoting
PowerShell for Hyper-VNo built-in cmdletsRich set of WMI interfaces under root\virtualization namespace108 classes prefixed with Msvm_Complex to scriptPowerShell module for Hyper-VDeveloped by James O’neillhttp://pshyperv.codeplex.comSystem Center Virtual Machine Manager cmdlets
Hyper-V WMI - OverviewGet enabled when Hyper-V role is installedPresent in root\virtualization namespace108 classesExcluding the CIM and system classesCan be categorized in to:BIOSInputIntegration ComponentMemory / Processor / Networking / Storage / Serial / Video DevicesVirtual System & Virtual System ManagementProfile Registration & Resource Management
Hyper-V WMI: Virtual Machine ManagementMsvm_VirtualSystemManagementService class is usedCreate, Delete, and Manage VMsDefineVirtualSystemDestroyVirtualSystemModifyVirtualSystemModifyVirtualSystemResourcesRemoveVirtualSystemResourcesImport, Export, and snapshot VMsImportVirtualSystemExExportVirtualSystemExCreateVirtualSystemSnapshotRemoveVirtualSystemSnapshot
Hyper-V WMI: Virtual Network Management Msvm_VirtualSwitchManagementService class is usedCreate, Delete, and Manage virtual network componentsCreateSwitchCreateSwitchPortDeleteSwitchDeleteSwitchPortConnectSwitchPortDisconnectSwitchPort
Hyper-V WMI: Virtual Storage ManagementMsvm_ImageManagementService class is usedCreate, Mount, and Dismount virtual mediaCreateFixedVirtualHardDiskCreateDynamicVirtualHardDiskCreateDifferencingVirtualHardDiskMountUnmountValidateVirtualHardDisk
Hyper-V PowerShell ModuleScripting WMI interfaces isQuite complexQuite verboseHyper-V PowerShell ModuleDeveloped by James O’neillCan be download from http://pshyperv.codeplex.comImport-Module –Name hypervGet-Command –Module hypervContains 122 cmdlets
Hyper-V PowerShell Module: Virtual MachineGet-VMNew-VMRemove-VMMove-VMExport-VMImport-VMMany more….Get-Command -noun VM*
Get-VMSwitchNew-VMExternalSwitchNew-VMInternalSwitchNew-VMPrivateSwitchRemove-VMSwitchMany More..Get-Command –Noun VM*SwitchGet-Command -Noun VMNIC*Hyper-V PowerShell Module: Virtual Network
Hyper-V PowerShell Module: Virtual StorageCompress-VHDConvert-VHDDismount-VHDExpand-VHDGet-VHDMerge-VHDMount-VHDNew-VHDTest-VHDAdd-VMDriveRemove-VMDrive
Hyper-V PowerShell Module: VM ResourcesAdd-VMNICAdd-VMDiskSet-VMCPUCountSet-VMMemorySet-VMMany More..
ReferencesHyper-V WMI interfaces: http://msdn.microsoft.com/en-us/library/cc136986(v=VS.85).aspxPowerShell Module for Hyper-V: http://pshyperv.codeplex.comGetting Started with PowerShell: http://technet.microsoft.com/en-us/scriptcenter/dd742419
Q & A

More Related Content

PDF
Www.vmware.com support developer_windowstoolkit_wintk10_doc_viwin_admin
PDF
Microsoft System Center Operation Manager 2012 Beta Installation
PDF
Unbundling the Future Web Runtime
PPT
Virtualization
PPT
10215 A 04
PPT
Addmi 04-va installation
PPTX
Presentation on control panel in web hosting
PPTX
Windows Server 2008 Management
Www.vmware.com support developer_windowstoolkit_wintk10_doc_viwin_admin
Microsoft System Center Operation Manager 2012 Beta Installation
Unbundling the Future Web Runtime
Virtualization
10215 A 04
Addmi 04-va installation
Presentation on control panel in web hosting
Windows Server 2008 Management

What's hot (12)

PPTX
Presentation at VMware Workstation Instalation
PPT
Prepping software for w7 deployment
PDF
WooCommerce WP-CLI Basics
PDF
SAINT Virtual Machine Setup Instructions
PPTX
Managing Windows Vista With Windows Power Shell
ODP
Plug yourself in and your app will never be the same (1 hr edition)
PPTX
Microsoft App-V 5.1 and Flexera AdminStudio Webinar
PPTX
Lotus Notes Plugin Installation For Dummies
PPT
Top ESXi command line v2.0
PDF
How To Install Windows 11
PPTX
Windows Server Core
PDF
Upgradingtodominov10bestpractices1549485091676
Presentation at VMware Workstation Instalation
Prepping software for w7 deployment
WooCommerce WP-CLI Basics
SAINT Virtual Machine Setup Instructions
Managing Windows Vista With Windows Power Shell
Plug yourself in and your app will never be the same (1 hr edition)
Microsoft App-V 5.1 and Flexera AdminStudio Webinar
Lotus Notes Plugin Installation For Dummies
Top ESXi command line v2.0
How To Install Windows 11
Windows Server Core
Upgradingtodominov10bestpractices1549485091676
Ad

Viewers also liked (20)

PPTX
Storage and hyper v - the choices you can make and the things you need to kno...
PPTX
Attacking Web Applications
PPTX
Hyper V And Scvmm Best Practis
PDF
The Rules of Network Automation - Interop/NYC 2014
PPTX
Network Automation - Interconnection tools
PDF
The Datacenter Network You Wish You Had
PPTX
A Networking View for the DevOps Crew: SDN
PPT
Introduction To Work Item Customisation
PPTX
Security best practices for hyper v and server virtualisation [svr307]
PPTX
Understanding AzMan In Hyper-V
PDF
Windows Server 2008 R2 Hyper-V SP1 Component Architecture
PPTX
SQL and NoSQL in SQL Server
DOCX
Rodc features
PDF
Class graph neo4j and software metrics
PPTX
A Network Engineer's Approach to Automation
PPT
Getting Started With The TFS API
PDF
Network analysis with Hadoop and Neo4j
PDF
Hyper-V Best Practices & Tips and Tricks
PPT
DeltaV Development Systems in a Virtualized Environment
PPT
Master the Mystery and Marvels of DeltaV MPC
Storage and hyper v - the choices you can make and the things you need to kno...
Attacking Web Applications
Hyper V And Scvmm Best Practis
The Rules of Network Automation - Interop/NYC 2014
Network Automation - Interconnection tools
The Datacenter Network You Wish You Had
A Networking View for the DevOps Crew: SDN
Introduction To Work Item Customisation
Security best practices for hyper v and server virtualisation [svr307]
Understanding AzMan In Hyper-V
Windows Server 2008 R2 Hyper-V SP1 Component Architecture
SQL and NoSQL in SQL Server
Rodc features
Class graph neo4j and software metrics
A Network Engineer's Approach to Automation
Getting Started With The TFS API
Network analysis with Hadoop and Neo4j
Hyper-V Best Practices & Tips and Tricks
DeltaV Development Systems in a Virtualized Environment
Master the Mystery and Marvels of DeltaV MPC
Ad

Similar to Managing Hyper-V With PowerShell (20)

PPSX
Automating Windows Server 2008 R2 Administration with Windows PowerShell
PDF
Virtualizare si SCVMM2008
PPTX
Introduction to Hyper-V
PPT
Managing VMware with PowerShell - VMworld 2008
PPTX
SIM204-What's Coming in Virtual Machine Manager 2012?
PDF
Say Bye to VMware PowerCLI ! Time to "GOVC"
PPTX
System Center Virtual Machine Manager 2008 R2
PDF
IBM’s System Director VMControl: Advanced Multi-Platform Virtualization Manag...
PPTX
Scvmm Technical Overview.Son Vu
PPTX
Virtualization-Presentation-with-History
PPT
Lessons On Hyper V
PPTX
System Center 2012 for VMware Infrastructure
PPT
10215 A 05
PPT
10215 A 09
PPT
Windows_Server_2008_Management & Ack.ppt
PPTX
Upgrade, Migrate and Virtualisation with SharePoint 2010
PPTX
Virtualising Your Data Center
PDF
The Architecture Of V Mware Es Xi
PPTX
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
PPTX
Aidan finn vmm 2008 r2 - minasi forum 2010
Automating Windows Server 2008 R2 Administration with Windows PowerShell
Virtualizare si SCVMM2008
Introduction to Hyper-V
Managing VMware with PowerShell - VMworld 2008
SIM204-What's Coming in Virtual Machine Manager 2012?
Say Bye to VMware PowerCLI ! Time to "GOVC"
System Center Virtual Machine Manager 2008 R2
IBM’s System Director VMControl: Advanced Multi-Platform Virtualization Manag...
Scvmm Technical Overview.Son Vu
Virtualization-Presentation-with-History
Lessons On Hyper V
System Center 2012 for VMware Infrastructure
10215 A 05
10215 A 09
Windows_Server_2008_Management & Ack.ppt
Upgrade, Migrate and Virtualisation with SharePoint 2010
Virtualising Your Data Center
The Architecture Of V Mware Es Xi
Managing Web Infrastructure Systems With Windows Power Shell™ 2.0 90
Aidan finn vmm 2008 r2 - minasi forum 2010

More from Ravikanth Chaganti (20)

PPTX
Azure Bicep - An Introduction
PPTX
Azure CLI 2.0 Tips and Tricks
PPTX
Tests Driven PowerShell Learning
PPTX
PowerShell Data as File System
PPTX
Azure at the command line
PPTX
Microsoft Azure Cloud and DevOps
PPTX
Using PowerShell DSC with AWS Cloud and CloudFormation
PPTX
Developing Infrastructure Code for CI & CD
PPTX
PowerShell DSC Partial Configurations and Cross-node Synchronization
PPTX
Operations Validation for Infrastructure As Code - PSConfEU 2016
PPTX
Authoring Azure Resource Manager Templates - Future Unleashed 2015
PPTX
Cloud Computing for IT professionals
PPTX
Introduction to Microsoft Azure Compute
PPTX
Cross platform configuration management using Desired State Configuration
PPTX
Windows Server 2012 R2 Hyper-V Replica
PPTX
Whats new in Windows Server 2012 R2 Hyper-V
PPTX
Configuration management comes to Windows
PPT
Desired state-configuration-ravikanth-august-2013-vtc india
PPTX
Power shell saturday ravikanth
PPTX
PowerShell 3.0 workflows
Azure Bicep - An Introduction
Azure CLI 2.0 Tips and Tricks
Tests Driven PowerShell Learning
PowerShell Data as File System
Azure at the command line
Microsoft Azure Cloud and DevOps
Using PowerShell DSC with AWS Cloud and CloudFormation
Developing Infrastructure Code for CI & CD
PowerShell DSC Partial Configurations and Cross-node Synchronization
Operations Validation for Infrastructure As Code - PSConfEU 2016
Authoring Azure Resource Manager Templates - Future Unleashed 2015
Cloud Computing for IT professionals
Introduction to Microsoft Azure Compute
Cross platform configuration management using Desired State Configuration
Windows Server 2012 R2 Hyper-V Replica
Whats new in Windows Server 2012 R2 Hyper-V
Configuration management comes to Windows
Desired state-configuration-ravikanth-august-2013-vtc india
Power shell saturday ravikanth
PowerShell 3.0 workflows

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Advanced Soft Computing BINUS July 2025.pdf
Sensors and Actuators in IoT Systems using pdf
NewMind AI Weekly Chronicles - August'25 Week I
madgavkar20181017ppt McKinsey Presentation.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation

Managing Hyper-V With PowerShell

  • 1. Managing Microsoft Hyper-V with PowerShellRavikanth Chaganti
  • 2. About MeLead Engineer at DellWindows PowerShell MVPAuthor ofFree eBook: Layman’s guide to PowerShell 2.0 remotingFree eBook: WMI Query Language via PowerShell (coming soon)Co-author on Quest’s SharePoint 2010 & PowerShell cheat sheetBlog at http://www.ravichaganti.com/blog
  • 3. AgendaPowerShell 2.0 featuresIntegrated Scripting EnvironmentPowerShell remotingPowerShell for Hyper-VHyper-V WMI – OverviewVirtual Machine ManagementVirtual Network ManagementVirtual Storage ManagementHyper-V PowerShell ModuleQ & A
  • 4. PowerShell 2.0 FeaturesAdvanced FunctionsIntegrated Scripting EnvironmentRemotingBackground jobsEventingBetter error handling & debugging supportSeveral new cmdlets
  • 5. Integrated Scripting Environment (ISE)Output PaneScript PaneCommand Pane
  • 6. PowerShell RemotingEnables Universal Code Execution ModelWhatever runs locally should run anywhereUses Windows Remote ManagementSupports several remoting methodsInvoke-CommandInteractive remotingImplicit remoting
  • 7. PowerShell for Hyper-VNo built-in cmdletsRich set of WMI interfaces under root\virtualization namespace108 classes prefixed with Msvm_Complex to scriptPowerShell module for Hyper-VDeveloped by James O’neillhttp://pshyperv.codeplex.comSystem Center Virtual Machine Manager cmdlets
  • 8. Hyper-V WMI - OverviewGet enabled when Hyper-V role is installedPresent in root\virtualization namespace108 classesExcluding the CIM and system classesCan be categorized in to:BIOSInputIntegration ComponentMemory / Processor / Networking / Storage / Serial / Video DevicesVirtual System & Virtual System ManagementProfile Registration & Resource Management
  • 9. Hyper-V WMI: Virtual Machine ManagementMsvm_VirtualSystemManagementService class is usedCreate, Delete, and Manage VMsDefineVirtualSystemDestroyVirtualSystemModifyVirtualSystemModifyVirtualSystemResourcesRemoveVirtualSystemResourcesImport, Export, and snapshot VMsImportVirtualSystemExExportVirtualSystemExCreateVirtualSystemSnapshotRemoveVirtualSystemSnapshot
  • 10. Hyper-V WMI: Virtual Network Management Msvm_VirtualSwitchManagementService class is usedCreate, Delete, and Manage virtual network componentsCreateSwitchCreateSwitchPortDeleteSwitchDeleteSwitchPortConnectSwitchPortDisconnectSwitchPort
  • 11. Hyper-V WMI: Virtual Storage ManagementMsvm_ImageManagementService class is usedCreate, Mount, and Dismount virtual mediaCreateFixedVirtualHardDiskCreateDynamicVirtualHardDiskCreateDifferencingVirtualHardDiskMountUnmountValidateVirtualHardDisk
  • 12. Hyper-V PowerShell ModuleScripting WMI interfaces isQuite complexQuite verboseHyper-V PowerShell ModuleDeveloped by James O’neillCan be download from http://pshyperv.codeplex.comImport-Module –Name hypervGet-Command –Module hypervContains 122 cmdlets
  • 13. Hyper-V PowerShell Module: Virtual MachineGet-VMNew-VMRemove-VMMove-VMExport-VMImport-VMMany more….Get-Command -noun VM*
  • 14. Get-VMSwitchNew-VMExternalSwitchNew-VMInternalSwitchNew-VMPrivateSwitchRemove-VMSwitchMany More..Get-Command –Noun VM*SwitchGet-Command -Noun VMNIC*Hyper-V PowerShell Module: Virtual Network
  • 15. Hyper-V PowerShell Module: Virtual StorageCompress-VHDConvert-VHDDismount-VHDExpand-VHDGet-VHDMerge-VHDMount-VHDNew-VHDTest-VHDAdd-VMDriveRemove-VMDrive
  • 16. Hyper-V PowerShell Module: VM ResourcesAdd-VMNICAdd-VMDiskSet-VMCPUCountSet-VMMemorySet-VMMany More..
  • 17. ReferencesHyper-V WMI interfaces: http://msdn.microsoft.com/en-us/library/cc136986(v=VS.85).aspxPowerShell Module for Hyper-V: http://pshyperv.codeplex.comGetting Started with PowerShell: http://technet.microsoft.com/en-us/scriptcenter/dd742419
  • 18. Q & A