Skip to content

Commit

Permalink
suppress output of Remove (do New-DbaAgentJob)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjordan committed Oct 14, 2024
1 parent f0423f5 commit 3347948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/New-DbaAgentJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function New-DbaAgentJob {

if ($PSCmdlet.ShouldProcess($instance, "Removing the job $Job on $instance")) {
try {
Remove-DbaAgentJob -SqlInstance $server -Job $Job -EnableException -Confirm:$false
$null = Remove-DbaAgentJob -SqlInstance $server -Job $Job -EnableException -Confirm:$false
$server.JobServer.Refresh()
} catch {
Stop-Function -Message "Couldn't remove job $Job from $instance" -Target $instance -Continue -ErrorRecord $_
Expand Down

0 comments on commit 3347948

Please sign in to comment.