CuriousOne
CuriousOne

Reputation: 962

Pass IP into VNC Viewer

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>"

Upvotes: 1

Views: 2546

Answers (1)

henrycarteruk
henrycarteruk

Reputation: 13227

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

Upvotes: 1

Related Questions