SlideServe
Menu
Préférences
© SlideServe · v2026

PowerShell scripting for virtualized environment

lise avatar
15 diapositives · 296 Views · Jul 10, 2014

Discover the power of PowerShell scripting in managing virtualized environments, especially through Microsoft System Center Virtual Machine Manager (SCVMM) and Hyper-V. This guide covers essential topics including virtual workload management, offline patching of virtual machines, and health monitoring. Learn how to automate complex tasks, create and store VMs, and integrate with established tools using PowerShell’s object-oriented capabilities. Ideal for IT professionals looking to enhance their virtualization management skills.

PowerShell scripting for virtualized environment - slide 1
01 / 15PowerShell scripting for virtualized environment
1 / 17

Télécharger la présentation

PowerShell scripting for virtualized environment
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. PowerShell scripting for virtualized environment Chinmay Gokhale SE | Microsoft Chinmay.Gokhale@microsoft.com

  2. Virtualized Workload Management • System Center Suite • SCVMM - Virtualization Platform Management • SCCM - Offline patching of virtual machines. • SCOM - PRO Tips and Health Monitoring. • SCDPM - Provides data protection on mission critical systems

  3. DEMO SCVMM Console Managing :Hyper-V Virtual Server 2005 R2 SP1

  4. Why Windows Powershell? • It’s a full-fledged scripting language which can access command-line utilities and the Windows Management Interface (WMI). • Powerful and Object Oriented shell • Schedule complex tasks to run as script

  5. PowerShell and SCVMM • Command-line shell and scripting language • 170 command-line functions 13 classes from Hyper-V • Foundation for VMM administrator’s console and Self Service Portal • All PowerShell operations are logged and audited • Consistent scripting syntax and utilities that integrate with established tools and procedures • All functions of the Hyper-V MMC and VMM Admin Console can be done via PowerShell

  6. DEMO # ------------------------------------------------------------------------------------------ # New Virtual Machine Script to create and store New VM in Library # ------------------------------------------------------------------------------------------ # Script generated on <date/time stamp> by Virtual Machine Manager # # For additional help on cmdlet usage, type get-help <cmdlet name> # ------------------------------------------------------------------------------------------ New-VirtualNetworkAdapter–VMMServerlocalhost –JobGroup 18f4314f-97bc-4230-9896-65c935856379 PhysicalAddressType Dynamic –VLanEnabled $false New-VirtualDVDDrive –VMMServerlocalhost –JobGroup 18f4314f-97bc-4230-9896-65c935856379 –Bus 1 –LUN 0 $CPUType = Get-CPUType –VMMServer <VMM HOST DETAILS> | where {$_.Name –eq “1.20 GHz Athlon MP”} New-HardwareProfile –VMMServerlocalhost –Owner “<Owner Details>” –CPUType $CPUType –Name “Profile6fdcd372-f17a-401a-b9dc-ea88d59daceb” –Description “Profile used to create a VM/Template” -CPUC

  7. Managing Hyper-V with PowerShell • Use WMI; Hyper-V WMI namespace is located as root\virtualization • Msvm_VirtualSystemManagementService • Create and delete virtual machines, Import, export, and snapshot virtual machines • Msvm_VirtualSwitchManagementService • Create and delete networking resources • Msvm_ImageManagementService • Create, mount, and dismount virtual media (vhd and vfd)

  8. 13 Hyper-V Virtualization WMI Classes BIOS Classes Integration Component Classes Input Classes Resource Management Classes Memory Classes Virtual System Management Networking Classes Serial Devices Classes Processor Classes Virtual System Classes Profile Registration Video Classes Storage Classes

  9. WMI Management Services

  10. DEMO Get-WmiObject -namespace root\virtualization-class Msvm_ComputerSystem-computername localhostGet-WmiObject -namespace root\virtualization-class Msvm_ComputerSystem | Get-MemberGet-WmiObject -namespace root\virtualization-class Msvm_ComputerSystem| Format-Table ElementName, EnabledState

  11. Scripting More Easy • PowerShell Scriptomatichttp://www.microsoft.com/technet/scriptcenter/tools/psomatic.mspx• WMI Code Creatorhttp://www.microsoft.com/technet/scriptcenter/createit.mspx• PowerShell Editor (and it’s FREE!)http://powergui.org/index.jspa

  12. References • Microsoft System Center Virtual Machine Manager Homepage: http://www.microsoft.com/scvmm • Tech Center (for documentation and downloads): http://technet.microsoft.com/scvmm/default.aspx • Microsoft Virtualization Homepage http://www.microsoft.com/virtualization • Microsoft System Center Homepage http://www.microsoft.com/systemcenter/ • Microsoft Windows Server 2008 Hyper-V Homepage http://www.microsoft.com/hyper-v/

  13. PowerShell Hyper-V Resources • Hyper-V WMI documentation http://msdn2.microsoft.com/enus/library/cc136992(VS.85).aspx • Virtual PC guy http://blogs.msdn.com/Virtual_PC_Guy/ • Powershell management library for Hyper-V http://www.codeplex.com/PSHyperv

  14. Feedback / QnA • Your Feedback is Important! Please take a few moments to fill out our online feedback form at: For detailed feedback, use the form at http://www.connectwithlife.co.in/vtd/helpdesk.aspx Or email us at vtd@microsoft.com • Use the Question Manager on LiveMeeting to ask your questions now!