07-31-2014 05:53 AM
I want to create a powershell script to push out to all clients an update to there exclude lists.
Does anyone have something like this already?
I have over a 1000 Windows clients to update an would perfer not to do them one at a time.
Thanks.
Solved! Go to Solution.
07-31-2014 07:17 AM
In order to process a command against a large number of clients I use an excel spreadsheet to generate the script for me.
Say you have an exclude list called “exclude.txt”, which contains the following text.
/usr/thing_to_exclude
You would then run the following command to update the configuration for a host names example123.
bpsetconfig –h example123.yourcompany.com –e exclude.txt
In excel you would have your list of hosts in column "A". In column "B" you would write this
="bpsetconfig –h " & A1 & " –e exclude.txt"
Then you use the copy pull in the bottom right hand corner to copy that command down the document to cover all 1000 lines or whathaveyou.
Column B should now contain a command on each line with the name of each host from column A.
Copy this text out in to a powershell script. Run this script from the master server. Go get a drink. Put your feet up. Tell everyone you are working really hard on this exclude list thing. It's a really big project, after all.
07-31-2014 05:54 AM
Sorry I forgot to say we are running Netbackup 7.1 on a Windows platform.
07-31-2014 07:17 AM
In order to process a command against a large number of clients I use an excel spreadsheet to generate the script for me.
Say you have an exclude list called “exclude.txt”, which contains the following text.
/usr/thing_to_exclude
You would then run the following command to update the configuration for a host names example123.
bpsetconfig –h example123.yourcompany.com –e exclude.txt
In excel you would have your list of hosts in column "A". In column "B" you would write this
="bpsetconfig –h " & A1 & " –e exclude.txt"
Then you use the copy pull in the bottom right hand corner to copy that command down the document to cover all 1000 lines or whathaveyou.
Column B should now contain a command on each line with the name of each host from column A.
Copy this text out in to a powershell script. Run this script from the master server. Go get a drink. Put your feet up. Tell everyone you are working really hard on this exclude list thing. It's a really big project, after all.
07-31-2014 09:52 AM
Have used a bat script based on bpplclients to find the Windows Clients and a loop with bpsetconfig for each client with the excludelist file.
Think something like
@clients= bpclients command
foreach client @clients bpsetconfig command
is what you are looking for, but probably needs a little polishing