Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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