Anyone know how to obtain the current DSC working folder?
On the server, when DSC runs, it generates a folder stucture like the following:
C:\Packages\Plugins\Microsoft.Powershell.DSC\2.18.0.0\DSCWork\DSC.0
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:
Script GetDscCurrentPath
{
TestScript = {
return $false
}
SetScript ={
Write-Verbose (Get-Item 'C:\%path_to_dsc%\FileInsideMyDscAsset.txt')
}
GetScript = { @{Result = "GetDscCurrentPath"} }
}
Thoughts? Thanks in advance!!!