Summary
Several comment-based help examples reference wrong parameter names, non-existent functions, or have syntax errors. These examples are imported into the external help XML and shipped to users.
Broken Examples
Public/Test-FeatureFlag.ps1
- Calls
Get-DeviceContext which does not exist in this module (should be Get-DefaultContext)
- Passes
'' (empty string) as the -FeatureFlag argument — won't resolve to anything
- Omits
-PropertySet which is required for meaningful evaluation
- Example should also show pipeline usage:
Read-FeatureFlag ... | Test-FeatureFlag ...
Public/Test-Condition.ps1
- Uses
-Properties — the correct parameter name is -PropertySet
- Passes
$rules[0] (a Rule object) to -Condition which expects a ConditionGroup; should be $flag.Rules[0].Conditions
Public/Get-DefaultContext.ps1
- Uses
-Properties — correct name is -PropertySet
Public/Read-FeatureFlag.ps1
- Unclosed single quote:
Read-FeatureFlag -FilePath 'MyFeature.json (missing closing ')
docs/en-US/Test-Condition.md
- Inherits the wrong
-Properties parameter name from the source file
docs/en-US/New-Rule.md
- Example passes two
ConditionGroup objects comma-separated to a [ConditionGroup] (singular) parameter
Notes
Summary
Several comment-based help examples reference wrong parameter names, non-existent functions, or have syntax errors. These examples are imported into the external help XML and shipped to users.
Broken Examples
Public/Test-FeatureFlag.ps1Get-DeviceContextwhich does not exist in this module (should beGet-DefaultContext)''(empty string) as the-FeatureFlagargument — won't resolve to anything-PropertySetwhich is required for meaningful evaluationRead-FeatureFlag ... | Test-FeatureFlag ...Public/Test-Condition.ps1-Properties— the correct parameter name is-PropertySet$rules[0](aRuleobject) to-Conditionwhich expects aConditionGroup; should be$flag.Rules[0].ConditionsPublic/Get-DefaultContext.ps1-Properties— correct name is-PropertySetPublic/Read-FeatureFlag.ps1Read-FeatureFlag -FilePath 'MyFeature.json(missing closing')docs/en-US/Test-Condition.md-Propertiesparameter name from the source filedocs/en-US/New-Rule.mdConditionGroupobjects comma-separated to a[ConditionGroup](singular) parameterNotes