VMware: Upload local files to datastore with PowerCLI

2

I’m upgrading some hosts in my lab with vSphere 5 patch 1, I need to upload the zip packages from my laptop to my datastore.. it would be nice to do this via PowerCLI

The code:

$DataStore = Get-VMHost esx02.vmpros.lan | Get-Datastore ESX02_VMFS01
Copy-DatastoreItem C:\vmpros\patch1\ $DataStore.DatastoreBrowserPath -Recurse

image

Result:

image

About Author

2 thoughts on “VMware: Upload local files to datastore with PowerCLI

Leave a Reply

Your email address will not be published. Required fields are marked *