Skip to content

Commit

Permalink
Fix boolean logic and inline docs (dataplat#6874)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwsutherland authored Sep 28, 2020
1 parent 14d4823 commit aa8af68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions/Remove-DbaAgentSchedule.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Remove-DbaAgentSchedule {
<#
.SYNOPSIS
Remove-DbaAgentJobSchedule removes a job schedule.
Remove-DbaAgentSchedule removes a job schedule.
.DESCRIPTION
Remove-DbaAgentJobSchedule removes a job in the SQL Server Agent.
Remove-DbaAgentSchedule removes a job in the SQL Server Agent.
.PARAMETER SqlInstance
The target SQL Server instance or instances. You must have sysadmin access and server version must be SQL Server version 2000 or greater.
Expand Down Expand Up @@ -116,7 +116,7 @@ function Remove-DbaAgentSchedule {
Stop-Function -Message "Error occurred while establishing connection to $instance" -Category ConnectionError -ErrorRecord $_ -Target $instance -Continue
}

if (-not $InputObject -and (-not $Schedule -or $ScheduleUid)) {
if (-not ($InputObject -or $Schedule -or $ScheduleUid)) {
Stop-Function -Message "Please enter the schedule or schedule uid"
}

Expand Down Expand Up @@ -209,4 +209,4 @@ function Remove-DbaAgentSchedule {
end {
Write-Message -Message "Finished removing jobs schedule(s)." -Level Verbose
}
}
}

0 comments on commit aa8af68

Please sign in to comment.