@Renjith, I am aware of the add and remove CLI commands. But my requirement is to enable or disable the search peers which has been added already. During Active-Passive switchover, I will disable the active peers and enable the passive peers (like we do in the UI -> Distributed Search -> search peers option).
Normally for all operations from web, there should be CLI as well as configuration parameter available in splunk.
Are you looking for
splunk disable dist-search -auth admin:password
Sorry I don't have a splunk env to test it now.
./splunk help distributed