Solved

Powershell script to create vm from template

Posted on 2013-06-20
9
528 Views
Last Modified: 2013-12-19
Hello,
I need powershell script to create virtual machine. It should get following info from exel or .csv file and create a virtual machine.

server name
cluster
template
customization specs
datastore
number of disks and size with disk format (Thin or Thick)
Folder
Vlan
Processor
RAM
IP address,Subnet Mask, default gateway, DNS


Thanks
0
Comment
Question by:izharkhan
  • 3
  • 3
9 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 39264831
which server operating system?  Which version of powershell?
0
 

Author Comment

by:izharkhan
ID: 39264835
windows 2003/2008/2008 R2 and powershell version 2.0
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 39264848
For something like this, Microsoft created the Microsoft System Center Virtual Machine Manager. The necessary commandlets are only included in PowerShell 3.0 and maybe only with Server 2012 with Hyper-V role enabled.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:izharkhan
ID: 39264854
My client cant afford SCVMM. and if version powershell 3.0 has capability to create a script or if it can be done by powercli , i am fine with it. i checked lots of scripts online that supports 2003 and 2008 servers as well. but i have specific requirement which i posted.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 39268910
0
 
LVL 17

Accepted Solution

by:
Dushan911 earned 500 total points
ID: 39270445
0
 

Author Comment

by:izharkhan
ID: 39271668
0

Featured Post

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
A procedure for exporting installed hotfix details of remote computers using powershell
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now