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);