Hyper-V and PowerShell

Virtual Machines are used everywhere and considered essential for a scalable resource management and faster to be provisioned compared to physical one.

MS Hyper-V services and servers can be managed via Hyper-V Manager or System Center VMM GUI and of course via PowerShell.  So let’s start with the basics with PowerShell cmdlets.

Get-VM

Get a list of just the VMs used for testing purpose.

Using Start-VM with the pipeline to start them in a one-liner script:

Perform or List ChecksPoints of the VMs with Checkpoint-VM and Get-VMCheckpoint cmdlets:

Can you imagine how simple can be  to start or stop even a large number or VMs with a single script? Or perform checkpoints, Measure, Migrate VMs… and then running when it’s needed or schedule the task to fully automate the whole process?

Hyper-V module

https://technet.microsoft.com/en-us/itpro/powershell/windows/hyper-v/hyper-v

VM WARE

Speaking of Virtualization this post can’t be complete without VM Ware. PowerCLI is a command-line and scripting tool based on PowerShell and  automating management and configuration of VMware vSphere.

Get-VM

https://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/Get-VM.html

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.