?
Solved

Powershell script to create vm from template

Posted on 2013-06-20
9
Medium Priority
?
832 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
7 Comments
 
LVL 84

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 84

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
What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

 

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 17

Accepted Solution

by:
Dushan De Silva earned 2000 total points
ID: 39270445
0
 

Author Comment

by:izharkhan
ID: 39271668
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

839 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