new1234.jpg
Home > VMware > VMware: Upload local files to datastore with PowerCLI

VMware: Upload local files to datastore with PowerCLI

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

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

Categories: VMware Tags: , , ,