Posts

Showing posts from November, 2019

PowerShell Script to close all open tickets using PRTG API URL

# How to get rid of all PRTG tickets if you don't use them # # 1. Setup retention for closed tickers to one day # Setup > System Administration > Core & Probes > Historic Data Purging > Closed Tickets # # 2. Save this PowerShell script to a file and schedule it to run daily # # # PowerShell Script to close all open tickets using PRTG API URL # R7G5 / 2019-11-14 # Ensuring TLS/SSL connection to our host add-type @ " using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true ; } } " @ [ System.Net.ServicePointManager ]::CertificatePolicy = New-Object TrustAllCertsPolicy # return codes $http_code = @{ 200 = "OK"; 302 = "Found"; 400 = "Bad R