daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $header = @{
  2.  
  3.          Host: "#########";
  4.  
  5.          Authorization: "Basic ####################";
  6.  
  7.        }
  8.  
  9.  
  10. $body = @{  
  11.  
  12.         sourceName = "Anything here";
  13.  
  14.         sourceId = "Anything here ";  
  15.  
  16.         sourceIP = "##.##.##.###";    
  17.  
  18.         sourcePort = ####;
  19.  
  20.         datetime = "###############";
  21.  
  22.         payload = {
  23.  
  24.            monitors = [
  25.  
  26.                       "REST response time",
  27.  
  28.                       "Authentication failures"
  29.  
  30.                 ]
  31.            }
  32.  
  33.         }
  34.  
  35.   $Js = $body | ConvertTo-Json;
  36.  
  37.   $response = Invoke-RestMethod -Method PUT -Headers $headers -Uri http://$ipAddr/reader/monitors -Body $Js;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top