This is strange (and I didn't expect it in the vpxd log).
--> matchPattern = (string) [
--> "dpacsdicmp01\.vmx"
--> ],
It looks as if you are doing the Get-ChildItem on the datastore.
That should be on the folder where the VMX was downloaded.
Can you check if the following downloads the VMX file?
$tgtFolder = "C:\Temp\VMX\"
Get-VM -Name $vmName | %{
$dsName,$vmxPath = $_.ExtensionData.Config.Files.VmPathName.Split()
$dsName = $dsName.Trim('[]')
$ds = Get-Datastore -Name $dsName
New-PSDrive -Location $ds -Name DS -PSProvider VimDatastore -Root "\" | Out-Null
Copy-DatastoreItem -Item "DS:$vmxPath" -Destination $tgtFolder
Remove-PSDrive -Name DS -Confirm:$false
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference