PSMinIO Developer 2974ead76e Major improvements: MinIO 4.0.7 compatibility, file handle fixes, clean logging, session management
Key Achievements:
- Downgraded to MinIO 4.0.7 for PowerShell compatibility (eliminated async/await issues)
- Fixed file handle leaks in upload operations (using explicit FileStream management)
- Implemented clean logging (timestamps without redundant prefixes)
- Fixed automatic session variable management (Connect-MinIO stores, cmdlets retrieve)
- Removed duplicate certificate parameters (kept only SkipCertificateValidation)
- Fixed all 'Folder' alias conflicts across cmdlets
- Added correct System.Runtime.CompilerServices.Unsafe.dll version (4.5.3)

 Working Features:
- Connection management (automatic + explicit override)
- Bucket operations (list, create, remove)
- File upload/download (with proper handle release)
- Progress tracking and speed reporting
- Clean verbose logging with timestamps

 Known Issue:
- Chunked operations have threading violations (PowerShell cmdlet methods called from background threads)
- Regular operations work perfectly, chunked operations need threading architecture fix

 Test Results:
- 3.71GB Windows install.wim file tested
- Regular upload/download:  Working
- File handles:  No leaks, immediate deletion possible
- Session management:  Automatic connection storage/retrieval
- Chunked operations:  Threading violations need fix
2025-07-10 20:55:14 -04:00
2025-07-10 08:54:55 -04:00

PSMinIO

A fully-fledged C# PowerShell binary module built on top of the Minio .NET SDK for managing MinIO object storage operations.

Features

  • Cross-Platform Compatibility: Built for .NET Standard 2.0, compatible with PowerShell 5.1+ and PowerShell 7+
  • Comprehensive Bucket Operations: Create, list, delete, and check bucket existence
  • Object Management: Upload, download, list, and delete objects with progress tracking
  • Security & Policy Management: Manage bucket policies and access controls
  • Synchronous Operations: All operations are synchronous for PowerShell compatibility
  • Detailed Logging: Centralized logging with timestamps when -Verbose is specified
  • Progress Reporting: Upload/download progress with percentages and time estimates

Installation

# Import the module
Import-Module .\PSMinIO.psd1

Quick Start

# Configure connection
Set-MinIOConfig -Endpoint 'https://minio.myorg.com' -AccessKey 'AKIA...' -SecretKey 'abc123' -UseSSL

# Create a bucket
New-MinIOBucket -BucketName 'my-bucket' -Verbose

# Upload a file
New-MinIOObject -BucketName 'my-bucket' -ObjectName 'data.txt' -FilePath 'C:\data.txt'

# List objects
Get-MinIOObject -BucketName 'my-bucket' -Prefix '2025/'

# Download an object
Get-MinIOObjectContent -BucketName 'my-bucket' -ObjectName 'data.txt' -FilePath 'C:\downloaded-data.txt'

Cmdlets

Bucket Operations

  • Get-MinIOBucket - Lists all buckets
  • New-MinIOBucket - Creates a new bucket
  • Remove-MinIOBucket - Deletes a bucket
  • Test-MinIOBucketExists - Checks if a bucket exists

Object Operations

  • Get-MinIOObject - Lists objects in a bucket
  • New-MinIOObject - Uploads a file to a bucket
  • Get-MinIOObjectContent - Downloads an object
  • Remove-MinIOObject - Deletes an object

Security & Policy

  • Get-MinIOBucketPolicy - Retrieves bucket policy
  • Set-MinIOBucketPolicy - Sets bucket policy

Utility

  • Get-MinIOConfig - Shows current configuration
  • Set-MinIOConfig - Sets connection configuration
  • Get-MinIOStats - Displays statistics and metrics

Requirements

  • PowerShell 5.1+ or PowerShell 7+
  • .NET Framework 4.7.2+ (for PowerShell 5.1) or .NET Core/.NET 5+ (for PowerShell 7+)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

S
Description
A comprehensive PowerShell module for MinIO object storage operations with enterprise-grade features. Built with custom REST API implementation for optimal PowerShell compatibility and performance.
Readme GPL-3.0 6.5 MiB
Languages
C# 89.5%
PowerShell 10.5%