Friday, December 23, 2016

Proxy script for blocking websites

This proxy script can be used in Windows to either block individual websites (blacklisting) or allow only specific websites (whitelisting), this example is for whitelisting:


function FindProxyForURL(url, host) {
 // Bypass the proxy for *.blogger.com
 if (dnsDomainIs(host, ".blogger.com")) {
               return "DIRECT";
 }
 return "PROXY http://127.0.0.1:18080";
 } // End of function


This is saved as a .pac file. In Control Panel, in the Internet Options, find the Connections tab, LAN settings. Uncheck “Automatically Detect Settings”. Click to check the box named “Use automatic configuration script”.

In the address field, type the location of .pac file as the following:
File://C:/Path/script.pac
 
More here.
 

Thursday, December 1, 2016

Partly unnecessary Win7 services

A nice rundown of possibly unnecessary Win7 services, useful for slightly speeding up older computers.

Monday, November 28, 2016

Power shell script for Windows Server Backup status

Windows Server Backup does not include any notification possibilities - this script from Jocha.se is an easy way to add email notification via a custom task in Task Scheduler.

Wednesday, September 7, 2016

Computer last logon in Active Directory

A very useful way to check when a computer last logged on to Active Directory, done via PowerShell:

http://www.oxfordsbsguy.com/2014/04/28/powershell-get-adcomputer-to-retrieve-computer-last-logon-date-part-1/

Relevant commands:
Import-Module activedirectory
Get-ADComputer -Identity computer -Properties *

Friday, January 15, 2016