new1234.jpg

Archive

Posts Tagged ‘Upload’

VMware: Upload local files to datastore with PowerCLI

March 22nd, 2012 1 comment

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: , , ,