$vCenterServer = <YourvCenterServer> $Datastore = <YourDatastoreWithPlusSignInTheName> $IsoFile = <YourIsoFile.iso> Connect-VIserver -Server $vCenterServer $ds = Get-Datastore -Name $Datastore New-PSDrive -Name ds -PSProvider VimDatastore -Root '/' -Location $ds Copy-DatastoreItem -Item "c:\$IsoFile" -Destination "ds:\$IsoFile" Remove-PSDrive -Name ds
The only explanation on the syntax of a VMFS volume label seems to be in the ESXi Configuration Guide in the section where the vmkfstool is discussed. Besides that the label can be 128 characters long and can not contain leading or trailing blanks, there aren't any other rules.
It looks as if you might have found a bug in the PowerCLI datastore provider.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Peter,
There is a known bug about copying a file in the datastore root dir. As I see, you're doing the exactly this. Can you try copying in some subdir of the root, like:
Copy-DatastoreItem -Item "c:\$IsoFile" -Destination "ds:\subdir\$IsoFile"
Regards,
-Angel
Peter - try escaping the + sign
i.e. use the backtick ( ` ) (not ' ) before the plus sign - to identify it as a special character.
the backtick on a UK keyboard is top left, below the 'escape' key.