import requests, json, urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # --- Prepare our request header and url --- authJson={ 'X-Auth-Token': '3CC63163-9283-4115-B77B-AB024A06C99E', # replace with actual user token 'content-type': 'application/json' } b9StrongCert = False # Set to False if your Server has self-signed IIS certificate url = 'https://172.16.46.98/api/bit9platform' # replace with actual server address # --- Get computers without tamper protection enabled --- computers = requests.get(url + '/v1/computer?q=tamperProtectionActive:false', headers=authJson, verify=b9StrongCert).json() # --- For each computer found, send request to enable tamper protection for c in computers: print c['name'] + " " + c['agentVersion'] + ": Enabling Tamper Protection..." requests.post( url+'/v1/computer?newTamperProtectionActive=true', json.dumps(c), headers=authJson, verify=b9StrongCert) Collapse