Symptoms:
- PowerCLI cmdlet Copy-DatastoreItem returns an error when attempting to copy files to a vSAN datastore.
Copy-DatastoreItem : Upload of file 'C:\filename.ext' failed. Error message: Error while copying
content to a stream.
At line:1 char:1
+ Copy-DatastoreItem -Item c:\FileZilla_3.46.2_win64-setup.exe "vmstore ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-DatastoreItem], VimException
+ FullyQualifiedErrorId : Client20_StorageServiceImpl_UploadFile_UploadFailed,VMware.VimAutomation.ViCore.Cmdlets.
Commands.CopyDatastoreItem
When attempting to copy a file to a folder on a vSAN datastore, an error is returned.
Copy-DatastoreItem : 2/20/2020 1:18:58 PM VimDatastore The specified location '\LastConnectedVCenterServer\Datacenter_name\vsanDatastore\folder_name' does not exist.
At line:1 char:1
+ Copy-DatastoreItem -Item c:\filename.ext "vmstore ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Copy-DatastoreItem], PathException
+ FullyQualifiedErrorId : Core_VmStoreProviderCache_GetItem_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.CopyDatastoreItem