Not possible with a cmdlet I'm afraid.
Something like this for example$isoName = 'MyFile.iso'
$srcDS = 'DS1'
$srcFolder = 'ISO1'
$dstDS = 'DS2'
$dstFolder = 'ISO2'
$fileMgr = Get-View FileManager
$src = "[$srcDS] $srcFolder/$isoName"
$srcDCMoRef = (Get-Datastore -Name $srcDS).DatacenterId
$dst = "[$dstDS] $dstFolder/$isoName"
$dstDCMoRef = (Get-Datastore -Name $dstDS).DatacenterId
$force = $true
$fileMgr.CopyDatastoreFile($src,$srcDCMoRef,$dst,$dstDCMoRef,$force)Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
I would need to have the script to do that essentially one file at a time correct.
List the files and then a foreach loop? If I understand it correctly.
If you give the path to a folder, the folder, and all files in it, will be copied (or moved).Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
Very nice. I shall give it a shot.