Here is a simple VB script that I wrote for VCB/TSM. It has some basic error reporting and dynamically builds the VM backup string from an enter-delineated file "VMs.txt" within the "baclient" directory. Just replace "yourdomain.com" with your domain suffix. Hope this helps!
Option Explicit
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim strVCBFile
Dim strErrorFileName
Dim strErrorLog
Dim strVCBList
Dim strPreCmd
Dim strJobName
Dim strDay
Dim strMonth
Dim strYear
Dim strStream
Dim objFSO
Dim objShell
Dim objFile
Dim objErrorLog
Dim objStream
strVCBFile = "VMs.txt"
strErrorFileName = "VMerrors"
strPreCmd = "pre-command.bat"
strJobName = "VMBackup"
strVCBList = ""
strDay = Day(Date)
strMonth = Month(Date)
strYear = Year(Date)
strErrorLog = (strErrorFileName & " " & strMonth & "-" & strDay & "-" & strYear & ".txt")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
If objFSO.FileExists(strErrorLog) Then
set objErrorLog = objFSO.OpenTextFile(strErrorLog, ForAppending)
Else
set objErrorLog = objFSO.CreateTextFile(strErrorLog, ForAppending)
End If
If objFSO.FileExists(strVCBFile) Then
Set objFile = objFSO.GetFile(strVCBFile)
Set objStream = objFile.OpenAsTextStream(ForReading, TristateUseDefault)
Do While Not objStream.AtEndOfStream
strStream = objStream.readline
strStream = Trim(strStream)
strStream = strStream & ".yourdomain.com"
If reachable(strStream) Then
strVCBList = strVCBList & " " & strStream
Else
objErrorLog.writeline (strStream)
End If
Loop
objShell.Run (strPreCmd & " " & strJobName & strVCBList),,True
Else
End If
function reachable(HostName)
Dim objExecObject
Dim strText
reachable = false
set objExecObject = objShell.Exec("cmd /c ping -n 1 -w 100 " & HostName)
Do while not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadLine()
If Instr (strText, "Reply") > 0 Then
reachable = true
exit do
End If
Loop
end function