public/Get-NessusScanHistory.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function Get-NessusScanHistory() {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true, Position=0, valuefromPipeline=$true)]
        [string] $sid,
        [Parameter(Mandatory=$true, Position=1, valuefromPipeline=$true)]
        [string] $hid
    )
    $data = @{"history_id" = $hid}
    $resp = Send-NessusRequest "GET" "/scans/$sid" $data

    return $resp.info
}