Not as far as I know.
If you create the OVF yourself, you could consider making the switch to which to connect a property of the OVF package.
That way you can specify the value at the moment of the import.
I know this an old thread, but I encountered the same issue. Hopefully you have resolved it since then. I'm posting this here for others that come across this as well.
Here's my scenario:
Import-vapp using a portgroup on a vDS.
$vmAdapter = "vxw-dvs-37-universalwire-13-sid-20002-ULS_184.108.40.206/24"
$ovfConfiguration.NetworkMapping.Network_1.Value = $vmAdapter
This would fail with the following:
Import-VApp : 8/8/2017 11:47:11 AM Import-VApp "Network 'vxw-dvs-37-universalwire-13-sid-20002-ULS_220.127.116.11/24' is
not accessible from host with id 'HostSystem-host-27'."
At C:\users\chris\Documents\PowerCLI\deploy-vra.ps1:29 char:1
+ Import-VApp -Source $path -OvfConfiguration $ovfConfiguration -Name $ ...
+ CategoryInfo : InvalidArgument: (:) [Import-VApp], InvalidArgument
+ FullyQualifiedErrorId : ViCore_VappServiceImpl_ApplyNetworkMappings_NetworkNotAccessible,VMware.VimAutomation.Vi
This would work like OP mentioned if this was a standard vSwitch. Instead you have to do the following:
$ovfConfiguration.NetworkMapping.Network_1.Value = Get-vDSwitch "dvSwitch" | Get-vDPortGroup $vmAdapter
Out of curiosity, did you compare the 2 values?
Is there a difference, in type, in value?
It seemed to be looking for a standard switch only when OP and I wanted to pass through a vDS to it. I did test and confirm.
Here's a caveat to my situation. My vDS is named like so: "vxw-dvs-37-universalwire-13-sid-20002-ULS_18.104.22.168/24" It didn't seem to like the "/" in the name, so I did this instead:
$vmAdapter = "vxw-dvs-37-universalwire-13-sid-20002-ULS_22.214.171.124*"
$ovfConfiguration.NetworkMapping.Network_1.Value = Get-vDSwitch "dvSwitch" | Get-VDPortGroup $vmAdapter
I used a * in place of the / and allowed it find the full switch name. Alternatively, I can substitute any "/" for "%2f" since I did notice a vapp options file it noted it like so:
<ve:Adapter ve:mac="00:50:56:a4:b5:4d" ve:network="vxw-dvs-43-universalwire-13-sid-20002-ULS_126.96.36.199%2f24" ve:unitNumber="7"/>
Got it, thanks for the info.