Exclude collection from all layers except one

Hi! I have a problem with collections: Lets say I got few view layers (1-10) and I create a collection (col1). I need col1 to be active only one layer 1. Right now to do this I have to open each one of the rest 9 layers and click “exclude” 9 times. This is not very convincing. Perhaps I can do this with a script?