Posted By

benash on 01/29/11


Tagged


Versions (?)

Connect to many ESX hosts


 / Published in: Windows PowerShell
 

  1. @(1..25) + @(99..100) | ForEach-Object {
  2. Write-Host $hostname
  3. $hostname = "w1-vdi" + $_\3.ToString().PadLeft(3, "0") + ".eng.blah.com"
  4. Connect-VIServer -Server $hostname -User root -Password blah
  5. }

Report this snippet  

You need to login to post a comment.