We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently PSRule de-serializes YAML and JSON objects from string when the -Format parameter is used with Invoke-PSRule and Test-PSRuleTarget.
-Format
Invoke-PSRule
Test-PSRuleTarget
To read a YAML file from disk, Get-Content -Raw -Path path_to_file | Out-String needs to be used.
Get-Content -Raw -Path path_to_file | Out-String
For example:
Invoke-PSRule -InputObject (Get-Content -Raw -Path path_to_file | Out-String) -Format Yaml;
Instead -InputObject should automatically read and deserialize the file contents of FileInfo objects when the -Format is used.
-InputObject
Invoke-PSRule -InputObject (Get-ChildItem -Path path_to_file) -Format Yaml;
The text was updated successfully, but these errors were encountered:
Support input deserialization from FileInfo objects #95
4e97ce3
Add support for input deserialization from FileInfo objects #95 (#96)
1d55968
* Support input deserialization from FileInfo objects #95
BernieWhite
No branches or pull requests
Currently PSRule de-serializes YAML and JSON objects from string when the
-Format
parameter is used withInvoke-PSRule
andTest-PSRuleTarget
.To read a YAML file from disk,
Get-Content -Raw -Path path_to_file | Out-String
needs to be used.For example:
Instead
-InputObject
should automatically read and deserialize the file contents of FileInfo objects when the-Format
is used.For example:
The text was updated successfully, but these errors were encountered: