title: powershell prompt window to take user input
body: <p>I want to create a prompt box window to take a user input so that it makes the same numbers of VM as user inputs.</p>
  
  <pre><code>$clustername = Get-Cluster -Name 'BGC_CLUSTER'
  $n=Read-Host -Prompt 'How many VMs you want to create'
  
  for($i=1; $i -le $n; $i++)
  {
      $name=Read-Host -Prompt 'Input your server  name'
      New-VM -Name  $name -ResourcePool $clustername -Datastore 'VV_FC10K_RAID5_BGCMW21' -DiskGB 20 -MemoryGB 2 -NumCpu 2 
      New-CDDrive -VM "$name" -IsoPath "[VV_FC10K_RAID5_BGCMW20]rhel-server-6.9-update-7-x86_64-dvd.iso" -StartConnected
      Write-Host "VM has been Created"
  }
  
  Write-Host "All VM's have been created"
  </code></pre>