DSC via SCCM OSD?

Welcome Forums DSC (Desired State Configuration) DSC via SCCM OSD?

This topic contains 4 replies, has 2 voices, and was last updated by

 
Senior Moderator
3 months, 2 weeks ago.

  • Author
    Posts
  • #155442

    Participant
    Topics: 13
    Replies: 24
    Points: 17
    Rank: Member

    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.

  • #155493

    Participant
    Topics: 13
    Replies: 24
    Points: 17
    Rank: Member

    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.

  • #155553

    Senior Moderator
    Topics: 8
    Replies: 1009
    Points: 3,281
    Helping Hand
    Rank: Community Hero

    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
    
    • #155636

      Participant
      Topics: 13
      Replies: 24
      Points: 17
      Rank: Member

      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.

  • #155645

    Senior Moderator
    Topics: 8
    Replies: 1009
    Points: 3,281
    Helping Hand
    Rank: Community Hero

    Start-DscConfiguration -Path c:\temp -Wait just ran forever and then exited but IIS didn't actually apply.

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

The topic ‘DSC via SCCM OSD?’ is closed to new replies.