Solved

Powershell script to create vm from template

Posted on 2013-06-20
9
538 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 79

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 79

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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 79

Expert Comment

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

Accepted Solution

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

Author Comment

by:izharkhan
ID: 39271668
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

770 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