cancel
Showing results for 
Search instead for 
Did you mean: 

Powershell script for exclude lists.

Black_D
Level 2

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

INT_RND
Level 6
Employee Accredited

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.

View solution in original post

3 REPLIES 3

Black_D
Level 2

Sorry I forgot to say we are running Netbackup 7.1 on a Windows platform.

INT_RND
Level 6
Employee Accredited

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.

Michael_G_Ander
Level 6
Certified

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

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue