Install Microsoft and Windows Updates

A lot of scripts out there only install windows updates, this one gets the lot. I’ve found that there are a number of patches not included in the LanGuard patch management, so here’s a script to fill in the gaps. This script is a modified version of the one found here – blogs.technet.com/b/chrad/archive/2009/07/13/dynamic-provisioning-with-vmm-proxy-windows-updates-and-scripts.aspx Also just […]

Detect Internet Explorer Version

Someone requested how to determine what version of IE (internet explorer) was installed on a machine. The version registry entry was unreliable so this gets the version straight from the executable. strComputer = “.” Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2″) sQuery=”select * from cim_datafile where path=””\\Program Files\\Internet Explorer\\”” and filename=””iexplore”” and […]

Creating local ISO storage on XenServer

This is a short how to create a local ISO storage on XenServer. You can use WinSCP to drop ISOs in /var/opt/xen/iso_import. Go to the console and type mkdir -p /var/opt/xen mkdir -p /var/opt/xen/iso_import xe sr-create name-label=”Local ISO Storage” type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=iso Then the new SR should appear in your Xencenter console.

Mailcleaner on Citrix Xenserver

How to install mailcleaner on Citrix Xenserver Make a new VM use the Debian Squeeze 6.0 (64Bit) Set the Ram to over 1024 and what ever size HDD you need. Select the Mailcleaner install ISO Untick “Start the new VM automatically” Then click finish. Next open a console to your Xenserver. Run xe vm-list. Look […]

Deploy and run DeFraggler

This script will run Defraggler with the parameters of your choice. It will also deploy it if its not already installed. A full list of parameters can be found here – http://www.piriform.com/docs/defraggler/advanced-usage/command-line-parameters **Update** – 24/10/2012 Hey guys, Sorry but I forgot GFI ads a -logfile parameter at the end of scripts so I have updated […]

Exchange Queue Length Check

Heres a script to check the queue length in exchange. Just modify the $Threshold from 10 to whatever you desire. $snapinversion = 0; foreach ( $snap in get-pssnapin -registered) { if ( $snap.Name -eq ‘Microsoft.Exchange.Management.Powershell.Admin’ ) { $snapinversion = 2007; Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin -ErrorAction SilentlyContinue } if ( $snap.Name -eq ‘Microsoft.Exchange.Management.Powershell.Support’ ) { $snapinversion = 2010; […]

Xenserver Missing Removable storage Drives

Some times when USB drives have been plugged in for a long time they seems to disappear. Normally that’s not a problem you just unplug them and plug them back in. When the USB drive is in a Data center that’s a long way to drive just to unplug a drive and plug it back in. For Xenserver try modprobe -r usb_storage […]

Update Managed Antivirus

Here is a script that Updates MAV and resends the DSC information if required. Dim WshShell, oExec, OsType, FSO, bResendDSC, MAVPath, AgentPath Set WshShell = CreateObject(“WScript.Shell”) Set FSO = CreateObject(“Scripting.FileSystemObject”) OsType = WshShell.RegRead(“HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE”) If OsType = “x86” then AgentPath = “C:\Program Files\” elseif OsType = “AMD64” then AgentPath = “C:\Program Files (x86)\” end if […]

Restart PC if pending reboot

This script checks if there is any rename operations pending or updates pending and initiates a restart of the computer if required. By running this on demand you can ensure that computers are rebooted only if required,minimizing the effects on users and maximising up time. Dim strComputer Dim strKeyPath Dim strValueName Dim strValue Dim arrValues […]

Teamviewer Settings

Here is a script that will change TeamViewer settings to disable HTTP, Activates DirectIn to stop the dialog, prevents shutdown and stops it from checking for updates. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7] “ListenHttp”=dword:00000000 “Security_ActivateDirectIn”=dword:00000001 “Security_Disableshutdown”=dword:00000001 “UpdateCheckInterval”=dword:00000002