/build/static/layout/Breadcrumb_cap_w.png

Need vbscript to run a backup application commands multiple times

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   [ + ] Show 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 10 years ago
  • pjgeutjens i accept ur suggestion please share powershell script as per my request - rookie11 10 years ago
  • 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. - pjgeutjens 10 years ago
  • 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. - rookie11 10 years ago

Answers (0)

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ