public/Start-NessusScan.ps1

1
2
3
4
5
6
7
8
9
10
11
function Start-NessusScan() {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true, Position=0, valuefromPipeline=$true)]
        [string] $sid
    )
    $resp = Send-NessusRequest "Post" "/scans/$sid/launch"

    return $resp.scan_uuid
}