Script to securely backup IIS 6.0 Metabase

by File in: script

The following is a script to backup the IIS 6.0 Metabase.  Save it as bkupmeta.bat. REM delete mapping for H: if it exists net use h: /del REM map H: to remote server share net use h: \\RemoteServer\backup /user:RemoteServer\user password REM replace YouriisServerName with the name of your IIS web server SET SERVER=YouriisServerName REM yymmdd will be […]

Script to add an Active Directory Domain User or Group to a Windows Local Group

by File in: script, Windows

This Technet Hey Scripting Guy column describes how to add a Domain Group to a Local Windows Group: strComputer = “atl-ws-001” Set objLocalGroup = GetObject(“WinNT://” & strComputer & “/TestGroup”) Set objADGroup = GetObject(“WinNT://Fabrikam/Finance”) objLocalGroup.Add(objADGroup.ADsPath) where: atl-ws-001 is the name of the local computer you wish to add the domain group to TestGroup is the name […]

Howto: List all installed Windows updates in an easy to read format

by File in: howto, patches, script

Jesper has written a .vbs script that easily lists all installed updates on a Windows machine and outputs the results to a nicely formatted .htm file. The .htm file included links to the applicable Microsoft KB article for the particular update, and also includes the installation date. To run the script, start a command prompt […]

Howto: automatically remove files older than ‘x’ days, Part II

by File in: howto, script

Earlier I had posted my .vbs script for deleting files that were more than ‘x’ days old. I just ran across this script that accomplishes the same thing, using Windows 2003’s native forfiles comand (scroll down to step 4). echo on rem First Delete old SQL Backup Files FORFILES /p C:\filename /s /m *.* /d […]

Script to gracefully close an Outlook .pst file so it can be backed up

by File in: backup, office, script

I was listening to the latest episode of the Casting from the Server Room podcast this morning, and one of the discussions was about backing up an Outlook .pst when users leave Outlook open overnight, which is when the backup is scheduled to run.  In order to back an Outlook .pst file, the .pst file must […]

Script to backup the Windows Server System State using NTbackup from the command line

by File in: backup, script

Here’s a simple batch file script to backup the Windows Server 2003 System State to a removable drive: for /f “Tokens=1-4 Delims=/ ” %%i in (‘date /t’) do set dt=%%i-%%j-%%k-%%l for /f “Tokens=1” %%i in (‘time /t’) do set tm=-%%i set tm=%tm::=-% set dtt=%dt%%tm% C:\WINDOWS\system32\ntbackup.exe backup systemstate /v:yes /r:no /rs:no /hc:off /m normal /j “server04 […]

Script to export ISA server configuration to an .xml file

by File in: backup, script

We run ISA 2004 on a Windows 2003 server, and I was looking for a way to automatically export the ISA server’s configuration on a nightly basis. I found several examples of this type of script, but most were either too basic or too complex for my needs. Please note this script exports the ISA […]

Howto: Use clip.exe to redirect command line output to the Windows clipboard

by File in: howto, script, utilities, Windows

I was browsing the Windows Server Command Line Reference today and came across clip.exe.  I was not familiar with this little utility, but after a brief investigation I found that it could redirect command line output to the Windows clipboard. Why would I want to do this? I’m very command line oriented.  I grew up with […]

Scripts for Zenworks for Desktops on SLES 10 server

by File in: Novell, script, zenworks

I have a SLES 10 server that runs all of my Zenworks for Desktops components.  Whenever we have problems with one of the Zenworks components, the first thing I do is run this script that tells me the status of all the appropriate daemons: #begin #!/bin/bash #check status of Zenworks services clear . /etc/rc.status […]

Howto: Filter Message Tracking logs in Microsoft Exchange using Powershell

by File in: howto, script

Today I’ve been working with a vendor, trying to figure out why not all of my client’s users are receiving a certain notification email. I enabled message tracking in Exchange 2003, but it creates a log file that’s in a fairly unreadable format. I found this post that describes using the Microsoft Log Parser utility […]