Export-CrescendoCommand calls the ExportConfigurationFile method of the command object.
This generates json which looks like this
{
"Verb": "Install",
...
}
Export-CrescendoModule expects to find JSON which looks like this
{
"Commands": [
{
"Verb": "Install",
...
}
]
}
Unless the command definitions are in an array the Export-CrescendoModule generates an error
InvalidOperation: You cannot call a method on a null-valued expression.
Granted anyone generating code with Export-CrescendoCommand can hack the JSON file, but (IMHO) that should not be required
edit crucial word was missing from the last sentence
Export-CrescendoCommandcalls theExportConfigurationFilemethod of the command object.This generates json which looks like this
Export-CrescendoModuleexpects to find JSON which looks like thisUnless the command definitions are in an array the
Export-CrescendoModulegenerates an errorGranted anyone generating code with
Export-CrescendoCommandcan hack the JSON file, but (IMHO) that should not be requirededit crucial word was missing from the last sentence