Skip to content

Add new CMDlets (base64, systeminfo, cheksum)#27

Open
marko-stanojevic wants to merge 1 commit intomainfrom
feat/cmdlets
Open

Add new CMDlets (base64, systeminfo, cheksum)#27
marko-stanojevic wants to merge 1 commit intomainfrom
feat/cmdlets

Conversation

@marko-stanojevic
Copy link
Contributor

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

  • Added Get-FileChecksum cmdlet for calculating file hash checksums using various algorithms (MD5, SHA1, SHA256, SHA512), including robust error handling and result details (src/Commands/GetFileChecksumCommand.cs).
  • Added ConvertToBase64 and ConvertFromBase64 cmdlets 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]
  • Added Get-EnvironmentInfo cmdlet 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

  • Updated src/PSBinaryModule.psd1 to export the new cmdlets (Get-EnvironmentInfo, Convert-ToBase64, Convert-FromBase64) for use in PowerShell sessions.

Integration Tests

  • Added comprehensive integration tests for Get-FileChecksum, covering correct hash calculation for all supported algorithms, result structure, error handling, and pipeline input (tests/Integration/Module.Integration.Tests.ps1).
  • Updated tests to verify that Get-FileChecksum is exported by the module (tests/Integration/Module.Integration.Tests.ps1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant