Originally the Hint keyword could be used to name target objects and set TargetName for pipeline objects that did not implement a TargetName or Name property that was useful for identification.
Using this approach:
Hint is called every time a rule is executed and target name for the same object may flip-flop when rules call Hint differently.
Objects can't be named if no rules are evaluated.
PSRule v0.2.0 introduced binding options to allow customisation of TargetName up-front, which is not only more efficient but less prone to error.
Since Hint -TargetName is no longer required, we should deprecate and remove support for the -TargetName parameter of the Hint keyword.
Description of the issue
Originally the
Hint
keyword could be used to name target objects and setTargetName
for pipeline objects that did not implement aTargetName
orName
property that was useful for identification.Using this approach:
Hint
is called every time a rule is executed and target name for the same object may flip-flop when rules callHint
differently.PSRule v0.2.0 introduced binding options to allow customisation of
TargetName
up-front, which is not only more efficient but less prone to error.Since
Hint -TargetName
is no longer required, we should deprecate and remove support for the-TargetName
parameter of theHint
keyword.