Add new CMDlets (base64, systeminfo, cheksum)#27
Open
marko-stanojevic wants to merge 1 commit intomainfrom
Open
Add new CMDlets (base64, systeminfo, cheksum)#27marko-stanojevic wants to merge 1 commit intomainfrom
marko-stanojevic wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several new PowerShell cmdlets to the module, focusing on file operations, Base64 encoding/decoding, and environment information. It also updates integration tests and module exports to support these new commands. The most important changes are grouped below by theme.
New Cmdlets
Get-FileChecksumcmdlet for calculating file hash checksums using various algorithms (MD5, SHA1, SHA256, SHA512), including robust error handling and result details (src/Commands/GetFileChecksumCommand.cs).ConvertToBase64andConvertFromBase64cmdlets for encoding and decoding strings or file contents to/from Base64, with support for multiple text encodings (src/Commands/ConvertToBase64Command.cs,src/Commands/ConvertFromBase64Command.cs,src/Base64Conversion.cs). [1] [2] [3]Get-EnvironmentInfocmdlet to retrieve environment metadata such as machine/user name, PowerShell/.NET version, OS platform, and admin status (src/Commands/GetEnvironmentInfoCommand.cs,src/EnvironmentInfo.cs). [1] [2]Module Export Updates
src/PSBinaryModule.psd1to export the new cmdlets (Get-EnvironmentInfo,Convert-ToBase64,Convert-FromBase64) for use in PowerShell sessions.Integration Tests
Get-FileChecksum, covering correct hash calculation for all supported algorithms, result structure, error handling, and pipeline input (tests/Integration/Module.Integration.Tests.ps1).Get-FileChecksumis exported by the module (tests/Integration/Module.Integration.Tests.ps1).