potatoqualitee / tentools

💙 tenable.sc / nessus / acas powershell module
BSD 3-Clause "New" or "Revised" License
39 stars 7 forks source link

How to post to sc #7

Closed potatoqualitee closed 3 years ago

potatoqualitee commented 3 years ago
$accesskey = 'accesskey'
$secretkey = 'secretkey'
$URL = 'https://sc_hostname/rest/repository'
$headers = @{} 
$headers.Add("x-apikey", "accessKey=$accesskey;secretKey=$secretkey")
Invoke-RestMethod -Uri $URL -Method GET -Headers $headers | ConvertTo-Json >  output.txt
potatoqualitee commented 3 years ago

got it