Skip to content

Instantly share code, notes, and snippets.

@Dapacruz
Last active May 22, 2018 18:11
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 Dapacruz/ce9838cd75b9b2766323c30d488f49fb to your computer and use it in GitHub Desktop.
Save Dapacruz/ce9838cd75b9b2766323c30d488f49fb to your computer and use it in GitHub Desktop.
Copy Files to a VMware vSphere Datastore from PowerCLI
$datastore = Get-Datastore -Name 'ISOs' | Select-Object -First 1
$src = 'C:\Temp\VMware-VCSA-all-6.5.0-8307201.iso'
$ds = New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root '\'
Copy-DatastoreItem -Item $src -Destination ds:\
Remove-PSDrive $ds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment