Link to home
Create AccountLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

New VM using PowerCli

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
Avatar of Kelly Garcia
Kelly Garcia
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Is there anyone that can help?
ASKER CERTIFIED SOLUTION
Avatar of compdigit44
compdigit44

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer