File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -Disabled
90
90
Creates the job but sets it to disabled
91
91
92
92
. EXAMPLE
93
- New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -EventLogLevel ' OnSuccess'
93
+ New-DbaAgentJob -SqlInstance sql1 -JobName 'Job One' -EventLogLevel OnSuccess
94
94
Creates the job and sets the notification to write to the Windows Application event log on success
95
95
96
96
. EXAMPLE
@@ -219,11 +219,11 @@ Creates a job with the name "Job One" on multiple servers using the pipe line
219
219
}
220
220
221
221
# 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 )) {
223
223
Stop-Function - Message " Job $jobname already exists on $instance " - Target $instance - Continue
224
224
return
225
225
}
226
- elseif ($Force -and (( $server.JobServer.Jobs ) .Name -contains $JobName )) {
226
+ elseif ($Force -and ($server.JobServer.Jobs.Name -contains $JobName )) {
227
227
Write-Message - Message " Job $jobname already exists on $instance . Removing.." - Level Output
228
228
229
229
if ($PSCmdlet.ShouldProcess ($instance , (" Removing the job the job $ ( $instance ) " ))) {
You can’t perform that action at this time.
0 commit comments