DSC integration in powershell automation

Product: PowerShell Universal
Version: 1.4.6

Im trying to integrate DSC configuration within a runbook, the problem is that powershell universal will recognize the DSC configuration block as input parameters.

Objective is to create the mof files and then set the config via dsc module

The codeblock to create the MOF file will be interpreted as input parameters to the Automation Runbook which is not what i want.

Is there some way to not make powershell universal interpret these parameters as input to the runbook itself?

DSC codeblock to create the MOF which i dont want to be input parameters to the runbook:

[DSCLocalConfigurationManager()]
configuration SetPushMode
{

param (
    [Parameter(Mandatory=$true)]
    [string]
    $Computername
)

Node $Computername
{
    Settings
    {
        RefreshMode = 'Push'
        AllowModuleOverwrite = $true
        ConfigurationMode = 'ApplyOnly'

    }
}

}

Not at the moment but I would consider this a bug in PSU. I’ll open an issue for it. I think the only work around at the moment would be to create a script that contains the DSC config in the PSU repository directory and then call it from a script with PSU.

You also may be able to use the module feature of PSU to add your resources there and then call that DSC module from the PSU script.