Closed pcamelio closed 5 years ago
To complete the info after further test, I finally used one of the name of the DSCResource - GetFilePath - and the PSDsc works fine Here is the ressource I am using:
[vm-105]: PS C:\Users\adm-pc\Documents> Get-DscResource -Module SqlServerDsc -name SqlScript | Select-Object -ExpandProperty Properties
Name PropertyType IsMandatory Values
---- ------------ ----------- ------
GetFilePath [string] True {}
ServerInstance [string] True {}
SetFilePath [string] True {}
TestFilePath [string] True {}
Credential [PSCredential] False {}
DependsOn [string[]] False {}
PsDscRunAsCredential [PSCredential] False {}
QueryTimeout [UInt32] False {}
Variable [string[]] False {}
finally, I don't know now if it is the expected behavior and the 1.7.4 was buggy :(
This looks correct to me. The Otter_ConfigurationKey value refers to the property of the DSC resource which is used to identify it. What is the isMaintenanceSQLPresent
value?
Hi IsMaintenance SQLPresent was an arbitrary value. I misundertood Otter_Configurationkey. As it was working in 1.7.4 , I thought the migration in 2.xx broke the code while it is not. Thanks you for the reply Regards Philippe
This has come up a few times. Suggestions on how to improve experience? Better error message?
French error message ;) Better error message would be good but more exemples in the documentation would be better I think.
Hello PSDsc seems to be broken in 2.12 in some cases while it works fine in 1.7.4 Exemple
Work fine in 1.7.4 while in 2.1.2 returns the error message
Unhandled exception: System.InvalidOperationException: The "Name" property of the DSC resource was not found. Use the "ConfigurationKey" argument for Ensure-DscResource or the "Otter_ConfigurationKey" argument for PSDsc to specify the property which uniquely identifies this resource on the server.
isMaintenanceSQLPresent is a name I set to the DSC. I made several try (unset Otter_ConfigurationKey, set value to sqlscript etc ...) unsuccessfully.
Ensure-DscResource is not working - same behaviour
I am stuck with the 1.7.4 version :( Regards