Sunday, September 13, 2015

Everyday Powershell - Part 34 - Browse the internet in private

Everyday Powershell. Getting you into the shell by providing little doses of utility that you could use everyday!

Does your Countries Government spy on it's citizens internet activity?

Do you think that's maybe a bit of a overreach?

Lot's of other people think that too!

One of the things the technically minded of us do to keep prying eyes from our private lives is run VPNs. If you've setup a VPN and have a dialler in windows you want to trigger you can use this script to fire up the VPN then kick off Chrome in Incognito Mode.


001
002
003
004
005
006
007
008
009
010
011
$connections = rasdial.exe
if ($connections -contains "No Connections"){
    rasdial.exe "SOME DIALER NAME", "SOMEUSER", "SOMEPASSWORD"
}

Start-Process "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList "-incognito"


#Create a desktop Shortcut with this;
#C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "& 'c:\scripts\dial-vpn.ps1'"