Skip to content

Instantly share code, notes, and snippets.

@nvpnathan
Created October 18, 2016 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nvpnathan/ce3ecc8efcb227a9415fe281712fd1da to your computer and use it in GitHub Desktop.
Save nvpnathan/ce3ecc8efcb227a9415fe281712fd1da to your computer and use it in GitHub Desktop.
# Setup array with hosts
$computehosts = @(
"10.172.156.85",
"10.172.156.84",
"10.172.156.89"
);
$mgmthost2 = "10.172.156.86"
$mgmthost3 = "10.172.156.91"
# Store your U&P
$user = "root"
$password = "VMware1!"
# Connect
Connect-VIServer -Server $computehosts -User $user -Password $password
New-Datastore -Name datastore1 -Path naa.6000c296d01e97949d1790ee592de98d
Connect-VIServer -Server $mgmthost2 -User $user -Password $password
New-Datastore -Name datastore2 -Path naa.6000c296d01e97949d1790ee592de98d
Connect-VIServer -Server $mgmthost3 -User $user -Password $password
New-Datastore -Name datastore3 -Path naa.6000c296d01e97949d1790ee592de98d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment