title: PowerShell DSC Composite Resources
body: <p>I have successfully create DSC Configurations and deployed them onto servers. As a next step, I tried to break apart the parts of the Configuration blocks that are common among servers into reusable sections, or in DSC parlance 'composite resources'. After a lot of researching I am still unable to use the composite resources, they are not listed when running 'Get-DSCResource'. </p>
  
  <p>After looking through the 'Get-DSCResource' function, it seems to require a 'DSCResources' subfolder which the PowerShell.org ebook doesn't state but the PowerShell Blog does. The Get-DSCResources function calls Get-Module with the resource name (SimpleConfig in the example). Both don't account for Get-Module not 'seeing' the sub folders when there isn't a psd1 in the root folder (BaseConfiguration in the example). I adapted these approaches resulting in the example below, but that has not succeeded either. </p>
  
  <p>I've looked at:</p>
  
  <ul>
  <li>PowerShell <a href="http://blogs.msdn.com/b/powershell/archive/2014/02/25/reusing-existing-configuration-scripts-in-powershell-desired-state-configuration.aspx" rel="noreferrer">Blog</a></li>
  <li>PowerShell.org <a href="https://github.com/PowerShellOrg/ebooks/tree/master/DSC" rel="noreferrer">EBook</a></li>
  <li>Steven Murawski's DSC <a href="http://powershell.org/wp/2013/10/14/building-a-desired-state-configuration-configuration-part-2/" rel="noreferrer">Series</a></li>
  <li>Steven Murawksi's DSC User Group <a href="https://plus.google.com/events/cbujdgrf1n4as5vrsf6o82j9drg" rel="noreferrer">Presentation</a></li>
  </ul>
  
  <p>Example Config:</p>
  
  <pre><code># $env:ProgramFiles\WindowsPowerShell\BaseConfiguration\BaseConfiguration.psd1
  @{
      ModuleVersion = '1.0'
      GUID = '84f449fd-8f26-4bb9-908f-eb675c56b5d8'
      Author = 'James Pogran'
  }
  
  # $env:ProgramFiles\WindowsPowerShell\BaseConfiguration\DSCResoures\SimpleConfig\SimpleConfig.schema.psm1
  Configuration SimpleConfig
  {
      Log LogThis
      {
          Message = "Foo"
      }
  }
  
  # $env:ProgramFiles\WindowsPowerShell\BaseConfiguration\DSCResoures\SimpleConfig\SimpleConfig.psd1
  RootModule = "SimpleConfig.schema.psm1"
  </code></pre>