03-05-2020 01:00 AM
Hi all,
In Bare Metal Restore Management > Hosts > Bare Metal Restore Clients, I have a list of around 2000 clients. But in all of these machines, almost half must be removed. Is there a way to delete several clients in one operation? Which would go much faster than having to do it one by one ...
Thanks for your help.
03-05-2020 02:30 AM - edited 03-05-2020 02:32 AM
If you have the list of clients to be deleted from BMR to hand in a text file named, perhaps "bmr-del.txt", then you could try this from the command line:
for /f %a in ('type bmr-del.txt') do (bmrs -operation delete -resource client -name %a)
...or if you want to execute the one-liner code from a script, then you will need two %% signs (don't ask me why), i.e. save this to bmr-del.bat :
for /f %%a in ('type bmr-del.txt') do (bmrs -operation delete -resource client -name %%a)
...and then execute it using :
bmr-del.bat
.
Of course be super careful with the text file list of client names and so be super sure that you really do want to delete them all from BMR config.