0

I want to setup port forwarding for my virutal machine in VMWare. I know I can do this with the Virtual Network Editor in VMware Workstation Pro, but I need to setup this port forwarding using a powershell script which means I need to do it using some command. I cannot seem to find any documentation on this besides a solution for VMWare Fusion. Has anyone tried setting up port forwarding in VMWare Workstation using the command line?

4
  • Looks like you want to check here potentially for a starting point: docs.vmware.com/en/VMware-Fusion/13/com.vmware.fusion.using.doc/… and search for setPortForwarding. Read it over, try some things, then come back and show what you've tried and is not working if that does not help with an edit. We're not supposed to just write people scripts for SU etiquette reasons unless they show their code and effort in on the matter. Good luck, ping me back if you want too. Commented Jul 22, 2023 at 20:20
  • As per vmware.com/pdf/vix162_vmrun_command.pdf, I see it states "The vmrun utility runs on any VMware platform with VIX libraries installed, including VMware Workstation, VMware Fusion, and VMware Server. For information about the various facilities that vmrun controls, see the user documentation for your product.". See here for installing PowerShell solution (PowerCLI) too: docs.vmware.com/en/VMware-vSphere/7.0/… and developer.vmware.com/web/tool/13.1.0/vmware-powercli Commented Jul 22, 2023 at 20:24
  • @VomitIT-ChunkyMessStyle the first vmware docs you are linking to states: "Only Fusion Pro supports the host network commands." so this is why I disregarded this. At the moment I'm trying the solution presented here: superuser.com/a/726147/1822210 but I cannot see the change in Virtual Network Editor after a restart of the VMware NAT Service so I'm trying to debug this at the moment.
    – John
    Commented Jul 23, 2023 at 11:14
  • @VomitIT-ChunkyMessStyle Nevermind your suggestion with vmrun just works :)
    – John
    Commented Jul 23, 2023 at 11:23

0

You must log in to answer this question.

Browse other questions tagged .