Saturday, July 24, 2021

PowerCLI script to upload/move files to a datastore

 PowerCLI script to upload/move files to a datastore


Connect-VIServer vcenterserver

$From = 'C:\Temp\windows.iso'

$To = 'vmstore:\DataCenter\DatastoreName\'

Copy-DatastoreItem -Item $From -Destination $To -Force

Disconnect-VIServer vcenterserver -Confirm:$false

No comments:

Post a Comment