Added scheduling support via the Set-NessusScanSchedule function
Added the function Set-NessusScanSchedule to Scan.ps1, adding support for managing scan schedules. Also added Get-NessusTimezones to support the Timezone parameter of this function.
It looks like Atom cleaned up a lot of excess whitespace automatically. I did not intend to make those changes, but they do not seem detrimental at all.
Set-NessusScanSchedule Examples:
Repeat a scan daily at 12:30 PM: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Frequency 'Daily' -StartTime '2018-03-30 12:30'
Repeat a scan every two weeks on Monday and Friday at 12:30 PM: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Frequency 'Weekly' -ByDay 'MO,FR' -Interval 2 -StartTime '2018-03-30 12:30'
Repeat a scan monthly on the second Tuesday at 12:30 PM: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Frequency 'Monthly' -RepeatBy 'Week of Month' -StartTime '2018-03-13 12:30'
Repeat a scan every three months on day 13 at 12:30 PM: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Frequency 'Monthly' -RepeatBy 'Week of Month' -Interval 3 -StartTime '2018-03-13 12:30'
Repeat a scan every year on March 30th at 12:30 PM UTC: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Frequency 'Yearly' -StartTime '2018-03-30 12:30' -Timezone 'UTC'
Disable an existing scan schedule: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Enabled $false
Enable an existing scan schedule: Set-NessusScanSchedule <SessionID[]> <ScanID[]> -Enabled $true