Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Powershell script to create vm from template

Posted on 2013-06-20
Medium Priority
Last Modified: 2013-12-19
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
customization specs
number of disks and size with disk format (Thin or Thick)
IP address,Subnet Mask, default gateway, DNS

Question by:izharkhan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 83

Expert Comment

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

Author Comment

ID: 39264835
windows 2003/2008/2008 R2 and powershell version 2.0
LVL 83

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.
Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as the high-speed power of the cloud.


Author Comment

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.
LVL 17

Accepted Solution

Dushan De Silva earned 2000 total points
ID: 39270445

Author Comment

ID: 39271668

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

618 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