From 8c5d1ea3247613854f86506b8d57a30872255728 Mon Sep 17 00:00:00 2001 From: "Hannappel, Christoph" Date: Tue, 15 Feb 2022 22:10:17 +0100 Subject: [PATCH] Fix: Regression Bug Databasename with a dash --- CHANGELOG.md | 2 ++ SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 261d1ec1e..5e9390664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SPTrustedRootAuthority - Fixed issue where certificates not in the Personal store could not be used +- Add-SPDscConfigDBLock + - Fixed issue where a Farm configuration Database could not contain a dash '-' ## [5.0.0] - 2021-12-17 diff --git a/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 b/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 index c91ddd425..0546761dc 100644 --- a/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 @@ -246,7 +246,7 @@ function Add-SPDscConfigDBLock $command.Connection = $connection # Added $Database just in case multiple farms are added at once. - $command.CommandText = "CREATE TABLE ##SPDscLock$Database (Locked BIT)" + $command.CommandText = "CREATE TABLE [##SPDscLock$Database] (Locked BIT)" $null = $command.ExecuteNonQuery() } finally