Solved

New VM using PowerCli

Posted on 2014-03-07
4
347 Views
Last Modified: 2014-04-08
Hi guys,

I've written this powercli script to create new VM's in my environment:

$dsc=Get-Datastore "asdasd"
$tmp=Get-Template -name *win*2008*r2*ent
$name="???"

New-VM -Name "$name" -Template $tmp -Datastore $dsc -Memorygb 4 -NumCPU 2 -Networkname DB_SQL_2264 -Notes "x" -DiskGB 40,50,50,100

Open in new window


Question is, is there a way I can pop up form on the $dsc, $tmp, $name variables and populate them accordingly, e.g $dsc will pop up all the datastore and allows you to select one.

 I need to set an static ip adreesses along with DNS information how can I do this?

Also I need to select an ISO image on the CD rom.

Thank you in advance.

Regards,
kay
0
Comment
Question by:Kay
[X]
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
4 Comments
 

Author Comment

by:Kay
ID: 39924053
Is there anyone that can help?
0
 
LVL 20

Accepted Solution

by:
compdigit44 earned 500 total points
ID: 39965362
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
The viewer will learn how to count occurrences of each item in an array.
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…

740 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