Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scheduling support via the Set-NessusScanSchedule function #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ConnorGriffin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant