Skip to content

Commit a116a0c

Browse files
Uwe Jankeclaude
andcommitted
Fix -Overwrite: Remove-DbaAgentJob -Confirm:$false instead of -Force (v1.4.15.0)
Remove-DbaAgentJob has no -Force in every dbatools version, so -Overwrite failed with "parameter 'Force' not found". Use -Confirm:$false (version-stable, matching all other job functions) in both login job creators. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 71e0d33 commit a116a0c

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# sqmSQLTool — Changelog
22

3+
## [1.4.15.0] — 2026-06-10
4+
5+
### 🔧 Fixes
6+
7+
- **New-sqmAutoLoginSyncJob / New-sqmAutoLoginCompareJob**: `-Overwrite` schlug fehl mit
8+
„A parameter cannot be found that matches parameter name 'Force'". `Remove-DbaAgentJob -Force`
9+
existiert nicht in jeder dbatools-Version; jetzt `-Confirm:$false` (versionsstabil, wie in
10+
allen anderen Job-Funktionen).
11+
312
## [1.4.14.0] — 2026-06-10
413

514
### 🔧 Fixes

Public/New-sqmAutoLoginCompareJob.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function New-sqmAutoLoginCompareJob
214214
{
215215
if ($PSCmdlet.ShouldProcess($JobName, "Loesche existierenden Job"))
216216
{
217-
Remove-DbaAgentJob -SqlInstance $SqlInstance -Job $JobName -Force -ErrorAction Stop
217+
Remove-DbaAgentJob -SqlInstance $SqlInstance -Job $JobName -Confirm:$false -ErrorAction Stop
218218
Invoke-sqmLogging -Message "Existierender Job '$JobName' geloescht" -FunctionName $functionName -Level 'INFO'
219219
}
220220
}

Public/New-sqmAutoLoginSyncJob.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ ORDER BY name ASC
302302
{
303303
if ($PSCmdlet.ShouldProcess($JobName, "Lösche existierenden Job"))
304304
{
305-
Remove-DbaAgentJob -SqlInstance $SqlInstance -Job $JobName -Force -ErrorAction Stop
305+
Remove-DbaAgentJob -SqlInstance $SqlInstance -Job $JobName -Confirm:$false -ErrorAction Stop
306306
Invoke-sqmLogging -Message "Existierender Job '$JobName' gelöscht" -FunctionName $functionName -Level 'INFO'
307307
}
308308
}

sqmSQLTool.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
RootModule = 'sqmSQLTool.psm1'
1818

1919
# Version number of this module.
20-
ModuleVersion = '1.4.14.0'
20+
ModuleVersion = '1.4.15.0'
2121

2222
# ID used to uniquely identify this module
2323
GUID = 'c4b10ba2-aee2-4d8d-ad86-a6e97c346ba6'
@@ -231,7 +231,7 @@
231231
# IconUri = ''
232232

233233
# ReleaseNotes of this module
234-
ReleaseNotes = 'See CHANGELOG.md and GitHub: https://github.com/JankeUwe/sqmSQLTool/releases/tag/v1.4.14.0'
234+
ReleaseNotes = 'See CHANGELOG.md and GitHub: https://github.com/JankeUwe/sqmSQLTool/releases/tag/v1.4.15.0'
235235
}
236236
}
237237
}

0 commit comments

Comments
 (0)