Advertisement
Guest User

Untitled

a guest
Oct 18th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. # Setup array with hosts
  2. $computehosts = @(
  3. "10.172.156.85",
  4. "10.172.156.84",
  5. "10.172.156.89"
  6. );
  7.  
  8. $mgmthost2 = "10.172.156.86"
  9. $mgmthost3 = "10.172.156.91"
  10.  
  11. # Store your U&P
  12. $user = "root"
  13. $password = "VMware1!"
  14.  
  15. # Connect
  16. Connect-VIServer -Server $computehosts -User $user -Password $password
  17.  
  18. New-Datastore -Name datastore1 -Path naa.6000c296d01e97949d1790ee592de98d
  19.  
  20. Connect-VIServer -Server $mgmthost2 -User $user -Password $password
  21. New-Datastore -Name datastore2 -Path naa.6000c296d01e97949d1790ee592de98d
  22.  
  23. Connect-VIServer -Server $mgmthost3 -User $user -Password $password
  24. New-Datastore -Name datastore3 -Path naa.6000c296d01e97949d1790ee592de98d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement