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