Check member email Dolphin script

Reading Time: < 1 minute

If you want to view who the top 100 message senders on your site is by ID number of the sender, run the below query in phpMyAdmin. It will be helpful to find spammers.

SELECT Sender, COUNT(Sender) as MessageSent FROM Messages GROUP BY Sender ORDER BY MessageSent DESC LIMIT 100;

You can look at a sample of their messages by running the below query (where 7701 is the Sender ID ):

SELECT * FROM `Messages` WHERE `Sender` =7701 LIMIT 30;

Disable hibernation via Group Policy

Reading Time: < 1 minute

There is currently no setting within Group Policy to disable or enable system hibernation.

But you could copy the below command to a batch file and add to Group Policy so it runs on system startup. It’s been tested on Windows XP.

powercfg.exe /hibernate OFF

Files last modified and total size script

Reading Time: < 1 minute

The below script will search for all files and folders modified after a certain date and then provide you with a total size in MB.

Amend the date and disk letter within the script as required, or add the path to the folder you wish to run the script against.

To be able to run the below script download Powershell and make sure you have a minimum of .net 2 installed. Powershell can be downloaded for free.

Write-Host $size
$length = (gci ‘C:\’ -Recurse |?{$_.lastwritetime -gt ’03/06/2009′}| Measure-Object length -Sum).sum

$size = ($length/1MB)

Write-Host $size

How to remove pending comments in bulk (Word Press)

Reading Time: < 1 minute

Pending links with a Word Press powered blog can grow really quickly and most is spam. Word Press allows you to remove such comments but only 20 at a time. What if you have thousands?

If you login to your hosting panel, access phpadmin, access your database, click SQL, input the below command click ok, all pending comments will be removed.

If unsure, seek help from a professional

DELETE FROM wp_comments WHERE comment_approved = '0'

Deploy Sophos AntiVirus via script

Reading Time: < 1 minute

Pushing out Sophos AntiVirus via the Sophos console does not always work and you can never be sure that all machines are protected until you go check each one manually. The below script will run at startup and install AntiVirus on those machines without. Amend the scripts as required.

@ECHO OFF
REM — Check for an existing installation of Sophos Anti-Virus
if exist “C:\Program Files\Sophos\Sophos Anti-Virus\SavService.exe” goto _End
REM — Deploy to Windows 2000/XP/2003
\\<SERVER>\InterChk\ESXP\Setup.exe -silent \ -updp “\\<SERVER>\InterChk\ESXP” -user “USER” -pwd “PWD” -mng yes
REM — End of the script
:_End

 

If you wish to exlude certain machines from the script, use the script below:

@ECHO OFF
REM — Check for an existing installation of AutoUpdate
if exist “C:\Program Files\Sophos\AutoUpdate\ALsvc.exe” goto _End
REM — Check for servers not to install to
if %COMPUTERNAME% == SERVER1 goto _End
if %COMPUTERNAME% == SERVER2 goto _End
REM — Deploy to Windows 2000/XP/2003
\\<SERVER>\InterChk\ESXP\Setup.exe -updp “\\<SERVER>\InterChk\ESXP” -user “USER” -pwd “PWD” -mng yes
REM — End of the script
:_End