Kelly Garcia
asked on
New VM using PowerCli
Hi guys,
I've written this powercli script to create new VM's in my environment:
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
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
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
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER