I am trying to get my little one liner to run without asking for confirmation. I just want it to complete without stopping. Get-VM and Set-VM take long enough as it is..I cant figure out what I am doing wrong. I am new to PS so go easy on me.
$vcs = Connect-VIServer "vmw-VC -User "" -Password $Password
$Vmcreate = "vmstest-vt01"
$Cpu = "2"
$mem = "2048"
$Network = "10.127.24.0"
*
Set-Vm $VMcreate -MemoryMB $mem -NumCpu $cpu | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName $Network -StartConnected $false
Any ideas? I tried using the -confirm $false but that didnt work. Maybe I am using it incorrectly.
Thank you*
*Glen
*
You have to put a colon after Confirm.
set-vm -confirm:$false
--
$signature = "Hal Rottenberg, MVP - PowerShell"
$projects = @{ title = "Blog Author"; url = "http://halr9000.com" },
@{ title = "Co-host"; url = "http://powerscripting.net" },
@{ title = "Community Director"; url = "http://PowerShellCommunity.org" },
@{ title = "Psi Webmaster"; url = "http://psi-im.org" }
Thanks.. man right when I think I am getting it.. I miss something like
this..
Glen
Glen E. Adkins II
VMware Enterprise Admin
Server Support/Engineering
Phone:(614)-293-0731
Pager:(614)-346-4195
Glen.AdkinsII@osumc.edu