ERROR the member if is not valid. valid members are dependon, name, value

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Nitin Gupta Nitin Gupta 4 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38681
    Profile photo of Efff dd
    Efff dd
    Participant

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

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

    #38696
    Profile photo of Nitin Gupta
    Nitin Gupta
    Participant

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.