Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I am trying to update some Assets in Tenable for some scans we have. I am able to change some of the fields that I need to, but I am lost when it comes to updating the asset itself.

 

If I want to change the scan time or IP list etc I can use the Code below

$update_asset = (ConvertTo-Json -compress @{

"maxScanTime"="12"

"ipList"=""

"assets"="38"

})

$update_asset

Invoke-RestMethod -Method PATCH -URI $URI -Headers $headers -Body $update_asset

 

From what I can see this is because the format is

 

"response" : {

"id" : "4",

"name" : "POSTtest",

"description" : "This is a test for POST",

"ipList" : "",

"reports" : [],

"assets" : [],

 

But I am completely lost for the format I need to use when the structure is "assets" : [] Can someone please point me in the right direction?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...