I often work remotely. Its a prereq of travel. It seems that no matter how far I travel my work always finds me and asks me to help resolve some computer problem.
While I was working in Bangkok I wrote a script which will remotely install VNC onto workstations, allowing me to remotely access any workstation on demand. This works great in most instances except when the user has the Windows Firewall installed.
Now all was not lost. As long as the "File and Print" shareing has been enabled we have ways to remotely enable / disable / or add exceptions to the Windows Firewall remotely. Here’s how you do it:
You will need the PSTools Suite from Microsoft Systernals. The PSEXEC program allows you to remotely execute commands on a remote PC.
Disable Windows Firewall
psexec \\computername netsh firewall set opmode enable
Add a port for VNC
psexec \\computername netsh firewall add portopening TCP 5900 VNC enable subnet