Comments (3)
Thanks for the detail @tonyskidmore.
Currently we believe this is a regression introduced in PS 7.4.x. PowerShell/PowerShell#21147
The issue affects the default view set by PSRule. The issue is noticable when running with the cmdlet interactively, and shouldn't affect most automated pipelines.
As a workaround until the fix ships you can update your command-line to select the specific properties you want as follows:
Invoke-PSRule -InputPath "$PWD/out/" -Module 'PSRule.Rules.Azure' | Select-Object RuleName, Outcome, Recommendation
from psrule.
@BernieWhite I have just started looking at PSRule and have come across this issue trying to get started using PowerShell 7.4.1.
Export-AzRuleData -OutputPath "$PWD/out/"
Invoke-PSRule -InputPath "$PWD/out/" -Module 'PSRule.Rules.Azure'
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.
If I run the same command from PowerShell 7.3..11 it works, i.e., I see output:
cmd.exe
cd C:\tools\PowerShell-7.3.11
pwsh
Get-Host
Name : ConsoleHost
Version : 7.3.11
InstanceId : 0faf6a9e-eab1-47d2-aa9e-95ce70c48f2e
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-GB
CurrentUICulture : en-GB
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Invoke-PSRule -InputPath "$PWD/out/" -Module 'PSRule.Rules.Azure'
The problem for me is this is running in CD agents that have PowerShell 7.4.1 installed by default and I didn't want to start building containers just to do some initial POC testing in a pipeline.
from psrule.
Related Issues (20)
- bug: csv output of recommendation will result in wrong rows because of new lines HOT 2
- Bump tooling to .NET 7
- Challenges with nullable types HOT 8
- Add lock file support
- Cast exception when expanding the union of an array and an AccessPolicyEntry[] HOT 4
- CLI IndexOutOfRangeException with lock file
- Improve support for match to process an array of string
- As 'Summary' option does not work HOT 5
- Add outcome argument for CLI
- Simplify usage of running analysis
- Add commands to list locked modules
- Move restore to module command
- CLI takes a long time to return when a file cant be found
- Include effective configuration in SARIF output
- Include source file hashes in SARIF
- Allow disabling PowerShell features that can be run from a repository
- CLI null reference when include module is undefined
- Investigate Input.IgnoreObjectSource bug
- Tooling shipped with VSCode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psrule.