Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $header = @{
- Host: "#########";
- Authorization: "Basic ####################";
- }
- $body = @{
- sourceName = "Anything here";
- sourceId = "Anything here ";
- sourceIP = "##.##.##.###";
- sourcePort = ####;
- datetime = "###############";
- payload = {
- monitors = [
- "REST response time",
- "Authentication failures"
- ]
- }
- }
- $Js = $body | ConvertTo-Json;
- $response = Invoke-RestMethod -Method PUT -Headers $headers -Uri http://$ipAddr/reader/monitors -Body $Js;
Add Comment
Please, Sign In to add comment