Using powershell to re-link Tenable Nessus Agent

1.8k Views Asked by At

I have several, systems (MS OS) that have the Tenable Nessus agent installed in my environment. I am attempting to re-link the agent to the management portal via PowerShell. I will be using SCCM to execute, the script so I created a simple PS script with one line of code that will execute the script remotely on the workstation. I can execute the script locally using powershell no problem, on errors, and the Nessus agent re-links.

I am sure, I am overlooking something. Here is my script


    Invoke-Command -ScriptBlock { Start-Process 'C:\Program Files\Tenable\Nessus 
    Agent\nessuscli.exe' -ArgumentList 'agent link -- 
    key=<License Key> -- 
    host=<hosted portal here> --port=<port>' -Passthru -NoNewWindow

Thank you for your time

0

There are 0 best solutions below