Maaheen
Maaheen

Reputation: 1

How to provide nessus agent download url in runcommand

Instead of hardcoding the url in the runcommand for nessus agent installation since the verison keeps changing over the time. I want to execute the ssm automation runcommand as a part of an automation runbook.

I just tried providing version as a parameter.

 Invoke-WebRequest -Uri 'https://www.tenable.com/downloads/api/v2/pages/nessus/files/NessusAgent-{version}-x64.msi' -OutFile 'C:\\NessusAgent.msi'
 Start-Process msiexec.exe -ArgumentList '/i' 'C:\\NessusAgent.msi', '/quiet', '/norestart' -Wait",
 Start-Service 'Tenable Nessus Agent'

Upvotes: 0

Views: 62

Answers (0)

Related Questions