Renew IP address

Simple script to renew the computers ip address ipconfig /release && ipconfig /renew

Enable RDP Access

Quick script to enable RDP sessions on a computer Taken from Const ENABLE_CONNECTIONS = 1 strComputer = “.” Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}\\” & strComputer & “\root\cimv2”) Set colItems = objWMIService.ExecQuery(“Select * from Win32_TerminalServiceSetting”) For Each objItem in colItems errResult = objItem.SetAllowTSConnections(ENABLE_CONNECTIONS) Next

Silently Uninstall Software

Here is a handy script I found to uninstall software as an automated task. This will be a lot better when GFI implement a feature to run a script once off. I have modified it to not be case sensitive and also to match contains. This means if you run /Program:adobe reader it will match […]

Silently Install Software

A common request in these threads is how to deploy software, so heres my take on it. Allows you to download a file and run parameters to silently install it. Once again, this will be more useful when GFI implements the ability to run a script once off. As for what switches to Install the […]

WSUS Cleanup Script

Here is a handy little script that cleans up WSUS 3 Automatically [reflection.assembly]::LoadWithPartialName(“Microsoft.UpdateServices.Administration”) | out-null $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); $cleanupScope = new-object Microsoft.UpdateServices.Administration.CleanupScope; $cleanupScope.DeclineSupersededUpdates = $true $cleanupScope.DeclineExpiredUpdates = $true $cleanupScope.CleanupObsoleteUpdates = $true $cleanupScope.CompressUpdates = $true #$cleanupScope.CleanupObsoleteComputers = $true $cleanupScope.CleanupUnneededContentFiles = $true $cleanupManager = $wsus.GetCleanupManager(); $cleanupManager.PerformCleanup($cleanupScope);

Change Xenserver Pool Master

Change Pool Master via CLI First disable high availability: xe pool-ha-disable Now list your XenServer hosts: xe host-list Using the list above, designate a new pool master by supplying the uuid associated with the desired host: xe pool-designate-new-master host-uuid= You’ll probably lose connection to the pool at this point, but that’s normal behavior. Once XenCenter […]

Google users targeted with malware-laden “Suspicious sign in” notices

Emails purportedly sent by the Google Accounts Team warning about a prevented “suspicious sign- in” have been spotted targeting Google users. “Someone recently tried to use an application to sign in to your Google Account,” says in the email. “We prevented the sign-in attempt in case this was a hijacker trying to access your account. Please review […]

GMap.NET Custom Image Marker

After using a great Map library I required to use a custom image instead of the default ones shipped with the pre-compiled binaries. Here is what I came up with and works a treat. Imports System.Drawing Imports GMap.NET.WindowsForms Namespace GMap.NET.WindowsForms.Markers Public Class GMapCustomImageMarker Inherits GMapMarker Private _image As Image Public Sub New(Image As Image, p […]