Posh-Nessus icon indicating copy to clipboard operation
Posh-Nessus copied to clipboard

new-nessussession parameters.

Open danSpotter opened this issue 7 years ago • 0 comments

I believe the api has changed. No port required and username/password in json format.

$RestMethodParams = @{ 'Method' = 'Post' 'URI' = "$($URI)/rest/token" 'Body' = @{'username' = $Credentials.UserName; 'password' = $Credentials.GetNetworkCredential().password} | ConvertTo-Json -Compress 'ErrorVariable' = 'NessusLoginError' }

        $TokenResponse = Invoke-RestMethod @RestMethodParams

danSpotter avatar Jun 26 '18 12:06 danSpotter