-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Problem description
Whatever I try in CommonTasks, it wil fail with DSCv3. Is this module not able to work with DSCv3? Everything I try fail. Other DSCResources work without any problem.
The only error I get is:
2025-11-18T14:26:02.445466Z ERROR PID 3268: Exception: Failed to serialize properties into CimInstance.
The properties are exact that from the docu.
Script I used:
"metadata": {
"description": "SQL Server 2022 Installation on V-MSSQL177",
"generated": "2025-11-04T15:42:28Z",
"author": "Ansible DSC Automation",
"target": "V-MSSQL177",
"instance": "MSSQLSERVER"
},
"resources": [
{
"type": "SqlServerDsc/SqlSetup",
"name": "InstallSQLServer2022",
"properties": {
"InstanceName": "MSSQLSERVER",
"Features": "SQLENGINE,FULLTEXT",
"SourcePath": "C:\\Temp\\SQLInst",
"SQLSysAdminAccounts": ["DST\\mSQLDSCinstall", "DST\\MSSQLAdmins"],
"InstallSharedDir": "C:\\Program Files\\Microsoft SQL Server",
"InstallSharedWOWDir": "C:\\Program Files (x86)\\Microsoft SQL Server",
"InstanceDir": "F:\\SQLSYSTEM\\Microsoft SQL Server",
"InstallSQLDataDir": "S:\\MSSQL\\Data",
"SQLUserDBDir": "D:\\MSSQL\\Data",
"SQLUserDBLogDir": "L:\\MSSQL\\Data",
"SQLTempDBDir": "T:\\MSSQL\\Data",
"SQLTempDBLogDir": "T:\\MSSQL\\Data",
"SQLBackupDir": "E:\\MSSQL\\Backup",
"SecurityMode": "SQL",
"SAPwd": {
"userName": "sa",
"password": "XXX"
},
"SQLSvcAccount": {
"userName": "dst\\mgVS-MSSQL175$",
"password": "XXX"
},
"AgtSvcAccount": {
"userName": "dst\\mgVS-MSSQL175$",
"password": "XXX"
},
"BrowserSvcStartupType": "Automatic",
"UpdateEnabled": "True",
"ForceReboot": false,
"SuppressReboot": true
}
},
{
"type": "CommonTasks/FailoverCluster",
"name": "Add Secondary",
"properties": {
"Name": "VS-MSSQL175",
"DomainAdministratorCredential": "XXX",
"Join": True
}
},
],
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json"
}`````
### Verbose logs
```text
dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:27:15.763518Z","level":"DEBUG","fields":{"message":"PID 7456: Constructing Get-DscResource cache"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:33.136591Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: PSResourceRepository => Type: ResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:33.788497Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: WindowsPackageCab => Type: System.Object"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:34.501701Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: SqlAgentAlert => Type: SqlResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:34.698098Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: SqlAudit => Type: SqlResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:34.883955Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: SqlDatabasePermission => Type: SqlResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.089323Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: SqlPermission => Type: SqlResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.342675Z","level":"DEBUG","fields":{"message":"PID 7456: Detected class-based resource: SqlRSSetup => Type: ResourceBase"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.800158Z","level":"DEBUG","fields":{"message":"PID 7456: Saving Get-DscResource cache to 'C:\\Users\\S954622\\AppData\\Local\\dsc\\WindowsPSAdapterCache.json'"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.967594Z","level":"DEBUG","fields":{"message":"PID 7456: OS version: Microsoft Windows NT 10.0.26100.0"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.967977Z","level":"DEBUG","fields":{"message":"PID 7456: PowerShell version: 5.1.26100.6584"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:35.970184Z","level":"DEBUG","fields":{"message":"PID 7456: PSDesiredStateConfiguration module version: 1.1"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:36.012141Z","level":"DEBUG","fields":{"message":"PID 7456: DSC resource implementation: ScriptBased"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:28:36.090381Z","level":"TRACE","fields":{"message":"PID 7456: The term 'Get-TargetResource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.{\"debug\":\"Module: commontasks, Name: FailoverCluster, Property: {\\\"Join\\\":true,\\\"Name\\\":\\\"VS-MSSQL175\\\",\\\"DomainAdministratorCredential\\\":\\\")MascAf-YUsY\\\\u003c18oiSo?RYChdRSJ\\\\u003cC\\\"}\"}"},"target":"dsc_lib::dscresources::command_resource","line_number":913}
{"timestamp":"2025-11-18T15:29:04.736512Z","level":"DEBUG","fields":{"message":"PID 7456: \r\n\r\nMessage : Failed to serialize properties into CimInstance.\r\nData : {}\r\nInnerException : \r\nTargetSite : Microsoft.Management.Infrastructure.CimInstance \r\n SerializeIntoCimInstance(System.Management.Automation.Language.DynamicKeyword, \r\n Microsoft.PowerShell.Commands.ModuleSpecification, System.Collections.Hashtable)\r\nStackTrace : at Microsoft.PowerShell.DesiredStateConfiguration.Commands.InvokeDscResourceMethodCommand.Serialize\r\n IntoCimInstance(DynamicKeyword resourceInfo, ModuleSpecification moduleSpecification, Hashtable \r\n property)\r\n at Microsoft.PowerShell.DesiredStateConfiguration.Commands.InvokeDscResourceMethodCommand.CreatePar\r\n ametersCollection()\r\n at \r\n Microsoft.PowerShell.DesiredStateConfiguration.Commands.InvokeDscResourceMethodCommand.ProcessRecord()\r\n at System.Management.Automation.CommandProcessor.ProcessRecord()\r\nHelpLink : \r\nSource : Microsoft.Windows.DSC.CoreConfProviders\r\nHResult : -2146233076\r\n\r\n\r\n\r\n"},"target":"dsc_lib::dscresources::command_resource","line_number":903}
{"timestamp":"2025-11-18T15:29:04.739124Z","level":"ERROR","fields":{"message":"PID 7456: Exception: Failed to serialize properties into CimInstance."},"target":"dsc_lib::dscresources::command_resource","line_number":897}
{"timestamp":"2025-11-18T15:29:04.798803Z","level":"DEBUG","fields":{"message":"Process 'powershell' id 7456 exited with code 1"},"target":"dsc_lib::dscresources::command_resource","line_number":660}
{"timestamp":"2025-11-18T15:29:04.800100Z","level":"ERROR","fields":{"message":"Error: Command: Resource 'powershell' [exit code 1] manifest description: Error"},"target":"dsc::subcommand","line_number":107}
```
### How to reproduce
Run the script from description on an WindowsServer with SQL Server installed.
### Expected behavior
No error output.
### Current behavior
2025-11-18T14:26:02.445466Z ERROR PID 3268: Exception: Failed to serialize properties into CimInstance.
### Suggested solution
I do not know, check the code sonething is not working in it with DSCv3 It seems to be the only module/resource currently that do not work with DSCv3. BTW: The Dependencies Modules/Resources work without this CommonTasks.
### Operating system the target node is running
```text
Windows Server 2025 Standard
MSSQL 2022
```
### PowerShell version and build the target node is running
```text
PowerShell
- 7.5.4
- 5.1.26100.6584
```
### Module version used
```text
activedirectorydsc.6.7.0.nupkg
CommonTasks.0.10.0.nupkg
computermanagementdsc.10.0.0.nupkg
FailoverClusterDsc.2.1.0.nupkg
sqlserver.22.4.5.1.nupkg
sqlserverdsc.17.2.0.nupkg
psdscresources.2.12.0.nupkg
```
Metadata
Metadata
Assignees
Labels
No labels