Discussed in #1722
Originally posted by paulmcclbg January 3, 2024
If I run the following:
Assert-PSRule -InputPath ./test-sample-1.json -Module PSRule.Rules.Azure
then the command runs fine and I get rule results outputted to the terminal (8 passed, 2 failed)
As soon as I change to
Invoke-PSRule -InputPath ./test-sample-1.json -Module PSRule.Rules.Azure
I get this error:
format-default: Cannot process argument because the value of argument "name" is not valid. Change the value of the "name" argument and run the operation again.
Can you please explain ? I want to use Invoke-PSRule due to invokation through Pester.
Note: Test-PSRuleTarget also runs fine and returns False.
There is an issue with the default formatting configuration in
|
<View> |
|
<Name>PSRule.Rules.RuleRecord</Name> |
|
<ViewSelectedBy> |
|
<TypeName>PSRule.Rules.RuleRecord</TypeName> |
|
</ViewSelectedBy> |
|
<GroupBy> |
|
<PropertyName>TargetName</PropertyName> |
|
</GroupBy> |
|
<TableControl> |
|
<TableHeaders> |
|
<TableColumnHeader> |
|
<Label AssemblyName="Microsoft.PSRule.Core" BaseName="PSRule.Resources.ViewStrings" ResourceId="RuleName"/> |
|
<Width>35</Width> |
|
</TableColumnHeader> |
|
<TableColumnHeader> |
|
<Label AssemblyName="Microsoft.PSRule.Core" BaseName="PSRule.Resources.ViewStrings" ResourceId="Outcome"/> |
|
<Width>10</Width> |
|
</TableColumnHeader> |
|
<TableColumnHeader> |
|
<Label AssemblyName="Microsoft.PSRule.Core" BaseName="PSRule.Resources.ViewStrings" ResourceId="Recommendation"/> |
|
</TableColumnHeader> |
|
</TableHeaders> |
|
<TableRowEntries> |
|
<TableRowEntry> |
|
<TableColumnItems> |
|
<TableColumnItem> |
|
<PropertyName>Name</PropertyName> |
|
</TableColumnItem> |
|
<TableColumnItem> |
|
<PropertyName>Outcome</PropertyName> |
|
</TableColumnItem> |
|
<TableColumnItem> |
|
<PropertyName>Recommendation</PropertyName> |
|
</TableColumnItem> |
|
</TableColumnItems> |
|
</TableRowEntry> |
|
</TableRowEntries> |
|
</TableControl> |
|
</View> |
Discussed in #1722
Originally posted by paulmcclbg January 3, 2024
If I run the following:
Assert-PSRule -InputPath ./test-sample-1.json -Module PSRule.Rules.Azure
then the command runs fine and I get rule results outputted to the terminal (8 passed, 2 failed)
As soon as I change to
Invoke-PSRule -InputPath ./test-sample-1.json -Module PSRule.Rules.Azure
I get this error:
format-default: Cannot process argument because the value of argument "name" is not valid. Change the value of the "name" argument and run the operation again.
Can you please explain ? I want to use Invoke-PSRule due to invokation through Pester.
Note: Test-PSRuleTarget also runs fine and returns False.
There is an issue with the default formatting configuration in
PSRule/src/PSRule/PSRule.Format.ps1xml
Lines 259 to 297 in e4f8bbe