DSC via SCCM OSD?

I have a customer that is a little confused and purchased SCCM to do configuration management of servers with SCCM. I explained to them that I can use a task sequence to apply an OS to a VM and I could probably run PowerShell to install features, but in turns of continuous automation like DSC can do, that would be out of scope. But I am wondering if I can during a task sequence Push a DSC configuration? I haven’t tried it yet and may very well have figured it out by the time someone responds but thought I would post here in case anyone has any advice while I am getting this ready.

Its not working. Although my task sequence doesn’t fail it looks like it finished but it does nothing. Here is the configuration I am applying.

Configuration IISWebsite
{
    Param (
    )
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    Node $env:COMPUTERNAME
    {
        WindowsFeature IIS
        {
            Ensure = "Present"
            Name = "Web-Server"
        }
        WindowsFeature ASP
        {
            Ensure = "Present"
            Name = "Web-ASP-Net45"
        }
    }
}
IISWebSite

And I am following this up by other step

Start-DscConfiguration -Path "C:\Windows\System32\IISWebsite" -Wait

I got that path by running as System (SCCM Runs as system) (PSEXEC) and seeing where it created the mof. the directory doesn’t get created and the configuration doesn’t apply but there are no errors.

So this may not be the way I can do this unless someone knows what I am doing wrong.

Can you try by specifying a path. It’s defaulting to current working directory if no path is mentioned.

IISWebSite -OutputPath c:\temp
Start-DscConfiguration -Path c:\temp -Wait

Thanks - It didn’t work but I got further. Adding in the -output path created the directory and the mof file but the Start-DscConfiguration -Path c:\temp -Wait just ran forever and then exited but IIS didn’t actually apply.

I would really like to get this working so still looking for suggestions. I admit that I may just have to stand up Orchestrator to do the type of automation that I need.

Can you trigger it with -Verbose. This will show detailed activity.