CmdID / PowerShell / Cmdlets / Get
Get-VMNetworkAdapterPortId
Gets the VFP/VSwitch port ID. Windows Server PowerShell reference
From the Windows Server PowerShell reference 2 parameters Its page in the reference
Parameters
-VMNameSpecifies the name of the virtual machine for which to retrieve the port ID.-VMNetworkAdapterNameSpecifies the name of the virtual machine network adapter for which to retrieve the port ID.