Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Improve documentation around Parameter values not accessible in Test and Set #67

Description

@cdhunt

Sample code: https://gist.github.com/cdhunt/80984dea7c6e45f42badf6c7f7f7bd8f

I've tried .GetNewClosure() on the Test and Set block as described in the Readme and $Name is always $null.

However, adding .GetNewClosure() on the New-RequirementGroup scriptblock did create a correctly scoped closure.

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions