echo Enabling firewall rule... netsh advfirewall firewall add rule name="SSHd" dir=in action=allow protocol=TCP localport=22 echo Downloading cygwin installer... $client = new-object System.Net.WebClient $client.DownloadFile( "http://www.cygwin.com/setup.exe", "c:\windows\temp\setup.exe" ) .\Windows\Temp\setup.exe