print  [print page]

» Script Library

Over the years I've banged out or absconded with the following collection of bash, perl, Windows and other scripts (among others) which I like to reference from time to time.

Script Description
esxi5-root_push.ps1 This PowerCLI script will reset the root password on ESXi hosts managed by vCenter. It will query vCenter for all managed hosts and then prompt for the existing and new root password, then cycle through them, exiting and restoring Lockdown Mode as necessary.
vmsnap This script is designed for creating snapshots of Virtual Machines hosted on standalone VMWare ESX hosts stored on NetApp filers. If you do not have SnapManager for VI or VirtualCenter to perform VCB backups you can use this script on the ESX host to command a quiesced NetApp snapshot of your VMs. This script is designed for systems using vfilers but can easily be mofidied otherwise.
backupWiki This bash script will backup multiple instances of MediaWiki, and is very useful when used as a preprocess to backupManager
backupLdap This bash script is designed for automated backups of Red Hat and 389 Directory Server LDAP servers. I use it in tandem with backupManager as a preprocess script.
rsyncBackups This bash script is designed for automated rsync backups. I use it in tandem with backupManager to rsync my backup repository to a hotswap disk.
SearchAllTables.sql This SQL script was written at my request by KwikSilvr on Ars Technica's forums, and is a Sybase stored procedure that can be used to search an entire database for a string. Useful for tracking down references to stale data or looking for stuff that may have moved.
ListHits This PERL script queries Oracle for all relational hit records using a sqlplus qx call, which it uses to populate a multi-dimensional array of hashes, thereupon dumping said hashes to a CSV file.
backupManager This is a fairly flexible bash script running on my webserver to backup all my critical resources to a fileserver. Includes change detection, file rotations, and more. Used with to run from cron and email any results.
ListJumpKits This KSH script connects to Oracle and dumps all unique Jumpkit records
LDAP_Backup A ksh script originally written for HP-UX that backs up a Motorola AFIS LDAP database, and rotates a week's worth of dumps.
MSSQLBackup A Windows CMD script that stops MSSQL, calls a NTBACKUP job, and restarts.
wallpaper A Windows VBS script used with GPO to force a background wallpaper
template This is a CMD script used as a boilerplate
instlibs This is a CMD script that hosts callable functions, similar to C code, used for anold EDEN CMD installer
installPostSP2 This CMD script installs a glob of hotfixes, useful for standalone updating of XP SP2 systems.
AllHalt This KSH script was used to shutdown all NIX servers within the AFIS using SSH and authorized_keys.
dbbackup This CMD script backs up a Sybase database used in Vortex (it creates a SQL script and invokes it). Requires backuplib.cmd and backupini.ini.
startKLVBroadcast This CMD script was used with ICSAS to start the KLVBroadcast service with options for listening port and capture file, useful for configuring shortcuts for multiple feeds.
classcontrol This bourne script was used on SGI for multiple boot classified systems. It was an init script to detect configured system classification level and help ensure disks weren't mixed between classifications.
DbRebuild This CSH script was used to rebuild an EDGE Edh database or add a new large volume of data.
common.js My common javascript functions used on this site
JS Toolkit An example of my javascript toolkit script for the header bar (print, detach, linear navigate) I use here and particularly with webdocs. The tools actually are defined in common.js or within the HTML files themselves..
getDellSN This VBS script can remotely lookup a Dell system service tag. I did not write this one, it was a Google plunder.
remotedefrag Either this VBS script or remotedefrag2 (I think it is the latter) will remotely defrag your Windows computer.
reversecat A BASH script that displays the last 100 file entries in reverse order, which I adpated for use in my showaccess CGI to monitor Apache's access_log This is a usefuil wrapper script for configuring custom email recipients for cron jobs, which otherwise always just go to root. Used with my backup scripts, and was swiped from
rebootExchange.bat Running Exchange on a server that is also a domain controller has documented issues which results in a very lengthy reboot time. Stopping Exchange via a script fixes this; this script will shutdown Exchange 2003/2007 and then shutdown or reboot the server depending ona menu choice. Modified version of what I swiped from A CGI script for uploading files to your webserver. A script I wrote for migrating data from StorNext to a NAS and updating a field in Sybase. It takes files lists generated using It was written to work on Windows but should work fine on Linux as well.
Copyright © 2006 Justin Mercier
Tigra Pro © SoftComplex