Hyper-V and PowerShell

Nowadays Virtual Machines are used everywhere and considered essential for scalable resource management and of course faster to be provisioned compared to the physical ones.

In this article, we will look mainly MS Hyper-V services and servers can be managed via Hyper-V Manager or System Center VMM GUI and of course via PowerShell. There will be a reference to PowerCLI and VMWare ESXi.

So let’s start with the basics of some useful PowerShell cmdlets.

Get-VM

Get a list of all your VMs used for testing purpose in your LAB-test*.

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 of 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, that is considered the top player in this field. PowerCLI is a command-line and scripting tool based on PowerShell and used for 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.