Skip to content

Commit c123242

Browse files
committed
Textual changes and remova of extra brackets
1 parent d12da95 commit c123242

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

functions/New-DbaAgentJob.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -Disabled
9090
Creates the job but sets it to disabled
9191
9292
.EXAMPLE
93-
New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -EventLogLevel 'OnSuccess'
93+
New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -EventLogLevel OnSuccess
9494
Creates the job and sets the notification to write to the Windows Application event log on success
9595
9696
.EXAMPLE
@@ -219,11 +219,11 @@ Creates a job with the name "Job One" on multiple servers using the pipe line
219219
}
220220

221221
# Check if the job already exists
222-
if (-not $Force -and (($server.JobServer.Jobs).Name -contains $JobName)) {
222+
if (-not $Force -and ($server.JobServer.Jobs.Name -contains $JobName)) {
223223
Stop-Function -Message "Job $jobname already exists on $instance" -Target $instance -Continue
224224
return
225225
}
226-
elseif ($Force -and (($server.JobServer.Jobs).Name -contains $JobName)) {
226+
elseif ($Force -and ($server.JobServer.Jobs.Name -contains $JobName)) {
227227
Write-Message -Message "Job $jobname already exists on $instance. Removing.." -Level Output
228228

229229
if ($PSCmdlet.ShouldProcess($instance, ("Removing the job the job $($instance)"))) {

0 commit comments

Comments
 (0)