Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

New VM using PowerCli

Posted on 2014-03-07
4
Medium Priority
?
369 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
2 Comments
 

Author Comment

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

Accepted Solution

by:
compdigit44 earned 2000 total points
ID: 39965362
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

824 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