Tidy up Always on VPN Connections

We recently moved from a test to live implementation of Always on VPN, and moved our servers behind a load balancer, ratifying out profiles down to a single user and device tunnel. We found that deleting the old connections from Settings still left a bunch of stuff in the registry, so I came up with …

Read moreTidy up Always on VPN Connections

How to unzip files in powershell

function Expand-ZIPFile($file, $destination) { $shell = new-object -com shell.application $zip = $shell.NameSpace($file) foreach($item in $zip.items()) { $shell.Namespace($destination).copyhere($item,16) #16 answers Y to any prompts, eg overwrite } } #call the function so: Expand-ZIPFile -file “c:\myfile.zip” -destination “d:\somedestination”   Amazon Auto Links: No products found.

Script to delete files older than x days

A quick script to delete files older than a certain number of days, be careful if you run this against a root dir!   ‘* Script Name: DeleteOldFiles.vbs ‘* Created On: 08/08/2013 ‘* Author: Jimmy White ‘* Version: 1.0 ‘NOTE! The Account used to run script needs delete permissions to folder & files. Const sSource …

Read moreScript to delete files older than x days

VB Script to show user description in BGINFO

I use BGINFO a LOT, in fact, I probably use it at every site I manage. the following script pulls out the user’s description from AD to allow BGINFO to display this. Obviously, you can edit this to show any AD attribute you want… On Error Resume Next Dim objSysInfo, objUser Set objSysInfo = CreateObject(“ADSystemInfo”) Set …

Read moreVB Script to show user description in BGINFO

Displaying Network Adapter Speed with WMI via the Win32 NetworkAdapter class

Quick little script to do the above.. Function GetNetworkSpeed(strComputer) Dim colItems, objItem, address Dim StrQuery Dim objWMIService StrQuery = “SELECT * FROM Win32_NetworkAdapter” Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2″) Set colItems = objWMIService.ExecQuery(strQuery,,48) For Each objItem in colItems GetNetworkSpeed = GetNetworkSpeed & vbTab & objItem.ProductName & vbCr Next End Function   Amazon Auto …

Read moreDisplaying Network Adapter Speed with WMI via the Win32 NetworkAdapter class