Last Update - 01/03/2005

Even though I'm working as a Network Admin, the coder in me just won't stay down. I've developed a few tools, scripts and techniques to help out in our office. I include them here in the hope that others can benefit. All these scripts and apps come with NO guarantees. They worked for us, but please try them in a test environment before letting them loose on your systems.

Freeing file locks
Don't you just hate it when files are locked on servers by a crashed process or a dull user? One way to release then is to reboot the machine, not always possible. Here's a better way.

ACL Tree Tweaker
A small tool to adjust ACLs down a directory tree, leaving other permissions intact. Can add, adjust or remove a group. Also useful when a group name needs to be changed.

Sophos Anti-Virus removal script
In November 2003 we had to remove Sophos Anti-Virus (v3.75) from 800 workstations in our domain to make way for a new AV product. I knocked up this batch file to do the dirty work.

The script performs the following actions:

When the target machine restarts, it is clean (apart from the inactive Sophos files) and new AV software can be deployed. Final cleanup is achieved when any user logs on.
The commandline is "RmSophos.bat \\targetmachine". The script can be run by anyone with admin rights to the remote machine. It requires Cacls.exe, SC.exe, Shutdown.exe and Reg.exe from the NT Server resource kit.

Incremental batch generator
This little Excel spreadsheet generates a list of incrementing values. We used it to generate a batch file to call the Sophos removal script for each machine on our domain.

Example output:

CALL RmSophos.bat \\NTWKSTN1000
CALL RmSophos.bat \\NTWKSTN1001
CALL RmSophos.bat \\NTWKSTN1002
CALL RmSophos.bat \\NTWKSTN1003
CALL RmSophos.bat \\NTWKSTN1004
CALL RmSophos.bat \\NTWKSTN1005
CALL RmSophos.bat \\NTWKSTN1006

 
Etc....

 

Problems, ideas, better routines ?
Mail me or drop into the forums


Home EMail Forum