I want to temporarily disable alerts on servers while they are being patched or put into maintenance mode. Is it possible to do this via PowerShell/REST?
If this for Splunk Enterprise Security or Splunk IT Service Intelligence, see the docs about maintance modes and noteable event suppression.
ITSI
https://docs.splunk.com/Documentation/ITSI/4.13.1/Configure/AboutMW
ES
https://docs.splunk.com/Documentation/ES/7.0.1/User/Takeactiononanotableevent#:~:text=Suppress%20a%2....
For Splunk Enterprise alerts via REST you could try this solution:
https://community.splunk.com/t5/Alerting/How-do-you-disable-enable-alerts-via-the-REST-API/m-p/44155...
Stopping the universal forwarder process as part of maintaince could be another option, but there are implication's to this. Transient inputs like scripted or network inputs will be lost, also doing this on mass on as a regular occurence may not result in the most optimal index/buckets.