Hi experts

I Need vbscript to run a backup application commands multiple times and display its output or save it output in text file.

earlier i had linux servers so do certain tasks like related to backup application line updating clients for WOFB n VSS , making clients offine was fairly simple task.

create a file on /tmp/ . update serverlist in it. then simple for loop would do the trick. no fancy script required.

for i in `cat serverlist`; do echo $i; /usr/openv/netbackup/bin/admincmd/bpclient -client $i -add -WOFB_enabled 1 -WOFB_FIM 1 -WOFB_usage 0 -WOFB_error 1; done

but now i hav windows OS based server please share windows based .VBS script which performs same function as about unix script.

4 Comments   [ - ] Hide Comments


  • does it have to be VBS? Powershell might be a better option, since it will more closely resemble your shell script, so might be an easier transistion.. (not to mention a single command)

    Something like ForEach ($i in (Get-Content -Path <..>)){bpclient $i -add ... etc etc

    and you can even use 'cat' as an alias for Get-Content...
  • pjgeutjens i accept ur suggestion please share powershell script as per my request
  • seriously, with what I already posted it should be a breeze composing the command yourself with the help of some googling if needed...

    If someone else wants to do it, fine, but I'm not going to spoonfeed you this one.
  • i just need a start mate. just want to do basic stuff. give me a powershell script once. I will figure out way to run my other commands.
Please log in to comment

Answer this question or Comment on this question for clarity


This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.