Tag: powershell

  • Test your DNS Proxy using a PowerShell Script

    Test your DNS Proxy using a PowerShell Script

    Introduction

    Most company’s have a policy to block dangerous websites for employees. Pornography, hate, gambling, social media are all categories that should be blocked. Either, they are big time wasters, or may be required by law to be blocked.

    Although you may have your proxy turned on correctly, that does not mean the bill got paid. Usually, a proxy will default to open for all users. You may be asked by outside 3rd party auditor’s or a senior manager to provide proof that the DNS proxy is actually working and blocking non-approved content.

    The script

    This PowerShell script will run as the current logged on user and send an email with the results. It will print the email in HTML format and each URL that it tests will be color coded. Red means site was blocked, green for site was successfully accessed, and gray for error.

    You will need to provide a list of websites in text document with one URL per line. I have included one below, as an example.

    Save this file as a ‘websitelist.txt’ file.

  • Ping Multiple Hosts using PowerShell

    Ping Multiple Hosts using PowerShell

    Are you are working in a windows environment and need to check if a large number of hosts are online? The below ps1 script may be what you are looking for. Place all hostnames to be checked in a text file called computer.txt and on one per line. Modify the script as necessary, then ‘run’ .