title: How do I obtain the current Windows DSC working folder (ie. "\DSC.0")?
body: <p>Anyone know how to obtain the current DSC working folder?</p>
  
  <p>On the server, when DSC runs, it generates a folder stucture like the following:</p>
  
  <p>C:\Packages\Plugins\Microsoft.Powershell.DSC\2.18.0.0\DSCWork\DSC.0</p>
  
  <p>The only trouble is when DSC gets a new version, it increments the ".X" folder.. However, when DSC runs, there is no clear way how to resolve the current folder from a script block predictably:</p>
  
  <pre><code>    Script GetDscCurrentPath
      {
          TestScript = {
              return $false
          }
          SetScript ={
              Write-Verbose (Get-Item 'C:\%path_to_dsc%\FileInsideMyDscAsset.txt')
          }
          GetScript = { @{Result = "GetDscCurrentPath"} }
      }
  </code></pre>
  
  <p>Thoughts? Thanks in advance!!!</p>