1

I'm trying to use VNC Viewer and pass in the server IP I need it to use. The trouble is I can't figure out the syntax of the -ArgumentList to do it properly.

Start-Process -Filepath "VNCViewer\viewer.exe" -ArgumentList "<hostname>=<$IP>"
henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
CuriousOne
  • 922
  • 1
  • 10
  • 26

1 Answers1

1

The vncviewer documentation lists the syntax as

vncviewer snoopy connects to display 0 on ‘snoopy’

So in your case, you would pass the computer name (IP) as the only argument... like this:

$IP = "192.168.1.1"
Start-Process -Filepath "VNCViewer\viewer.exe" -ArgumentList $IP
henrycarteruk
  • 12,708
  • 2
  • 36
  • 40