Author Posts

May 6, 2016 at 7:01 am

Environment EnvironmentalPath
{
if ($Node.Environment -eq 'Dev')

Ensure = 'Present'
Name = "Path"
Value = ";;c:\php\ext\"
Path = $true
}

May 6, 2016 at 9:38 am

You have to use if outside of resource block something like this:

if ($Node.Environment -eq 'Dev')
{
Environment EnvironmentalPath
{
Ensure = 'Present'
Name = "Path"
Value = ";;c:\php\ext\"
Path = $true
}
}

Only resource properties are allowed inside resource block.