Server 2012 Powershell module for Hyper-V how to create multiple vms

Using this PowerShell script you can the below mentioned script for create multiple vms from PowerShell module which is coming with hyper-v.I have just create this script for learning purpose and at the movement its not checking current hardware availability of the server/you may can develop this script.(Add the hardware profile,change the path,check the system resource availability).Before running this script you have to set the execution policy(set-executionpolicy )

 

Import-Module hyper-v

$vmname

$no

$no=Read-Host “How many no of vms you want?”

$vmname=Read-Host “Enter the name for one vm,it will continu like thi (vm1,vm2)”

for($i=1;$i -le $no;$i++)

{

$vmnamefull=$vmname+$i -as [string]

new-vm -Name $vmnamefull

}

 

 

 

 

 

Get-process/Stop-process

When we are working with PowerShell its very easy to use this command let for get some work with the processes. Even we can easily stop multiple processes at a given time. But if we used task manager for that, we have to do that more than one time. I have given some example that how we can  work with get-process and stop-process.

Get-process

Using this command we can get all the running processes on our desktop or a server(Its also possible to get running processes on remote computer using –computername parameter)

get-process

Continue reading “Get-process/Stop-process”