dsccommunity / DscWorkshop

Blueprint for a full featured DSC project for Push / Pull with or without CI/CD
MIT License
202 stars 163 forks source link

Datum.InvokeCommand does not work any longer #124

Closed nyanhp closed 2 years ago

nyanhp commented 2 years ago

datum.yml

DatumHandlers:
  Datum.ProtectedData::ProtectedDatum:
    CommandOptions:
      PlainTextPassword: SomeSecret
  Datum.InvokeCommand::InvokeCommand:

Not a single command is resolved, neither in RSOP nor during configuration. There are no error messages, the string is just used verbatim as the configuration parameter.

Input

SqlServer:
  DefaultInstanceName: MSSQLSERVER
  Setup:
    Action: Install
    SourcePath: '[x={"\\mediaserver\install\sqlserver\$($Node.SqlVersion)"}]'

RSOP

SqlServer:
  DefaultInstanceName: MSSQLSERVER
  Setup:
    Action: Install
    SourcePath: '[x={"\\mediaserver\install\sqlserver\$($Node.SqlVersion)"}]'
stehlih commented 2 years ago

The new Datum.InvokeCommand has a changed default syntax defined in Datum.InvokeCommand/source/Config/Datum.InvokeCommand.Config.psd1:

e.g. '[x={ $node.Environment }=]'

You must change }] to }=] in your code and it should work.

nyanhp commented 2 years ago

Ah, perfect. Thanks @stehlih, I would never have found that.