mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-09-03 18:55:40 +00:00
Add script for publishing to PowerShell Gallery
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
# Publish-PSProxmoxToGallery.ps1
|
||||||
|
# This script publishes the PSProxmox module to the PowerShell Gallery.
|
||||||
|
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$ApiKey,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $false)]
|
||||||
|
[string]$Version = (Get-Date -Format "yyyy.MM.dd.HHmm")
|
||||||
|
)
|
||||||
|
|
||||||
|
# Ensure the module is built
|
||||||
|
Write-Host "Building the module..."
|
||||||
|
& "$PSScriptRoot\build-release-only.ps1"
|
||||||
|
|
||||||
|
# Get the release directory
|
||||||
|
$releaseDir = Join-Path -Path (Split-Path -Parent $PSScriptRoot) -ChildPath "Release\$Version"
|
||||||
|
|
||||||
|
if (-not (Test-Path -Path $releaseDir)) {
|
||||||
|
Write-Error "Release directory not found: $releaseDir"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Publish the module to PowerShell Gallery
|
||||||
|
Write-Host "Publishing module to PowerShell Gallery..."
|
||||||
|
try {
|
||||||
|
Publish-Module -Path $releaseDir -NuGetApiKey $ApiKey -Verbose
|
||||||
|
Write-Host "Module published successfully!" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error "Failed to publish module: $_"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Open the PowerShell Gallery page
|
||||||
|
$moduleName = "PSProxmox"
|
||||||
|
Start-Process "https://www.powershellgallery.com/packages/$moduleName"
|
||||||
|
|
||||||
|
Write-Host "Done!"
|
||||||
+35
-18
@@ -1,27 +1,44 @@
|
|||||||
# PSProxmox v2025.05.09.1246 Release Notes
|
# PSProxmox v2025.05.10.1000 Release Notes
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
### VM Creation Enhancements
|
### Automatic Connection Handling
|
||||||
- Added padded counter functionality for multi-VM creation (e.g., "Prefix-00001")
|
- Added automatic connection handling so cmdlets use the default connection without explicitly passing it
|
||||||
- Added AutoSMBIOS capability parameters for setting realistic hardware information
|
- Added a global `DefaultProxmoxConnection` variable that stores the most recent connection
|
||||||
- Added Microsoft VMBIOS profile for SMBIOS settings
|
- Created a base `ProxmoxCmdlet` class that all cmdlets can inherit from
|
||||||
- Enhanced existing manufacturer profiles with more business-class workstations and servers
|
- Updated all cmdlets to use the base class and make the Connection parameter optional
|
||||||
- Improved serial number generation for major non-VM vendors
|
|
||||||
|
|
||||||
### SMBIOS Improvements
|
### Test-ProxmoxConnection Cmdlet
|
||||||
- Only generate random UUIDs if one is not already present
|
- Added a new cmdlet to test if a connection is valid and active
|
||||||
- Added more realistic hardware information for Dell, HP, Lenovo, and Microsoft devices
|
- Added a `-Detailed` parameter to get comprehensive connection information
|
||||||
- Added support for both server and workstation profiles for each manufacturer
|
- The cmdlet can test either a specified connection or the default connection
|
||||||
|
|
||||||
## Documentation
|
### Connection Object Improvements
|
||||||
- Added comprehensive documentation for the new features
|
- Added a custom `ToString()` method to the `ProxmoxConnection` class
|
||||||
- Added example scripts for using padded counters and SMBIOS settings
|
- The connection now displays as "Proxmox Connection: username@realm on server:port (Authenticated)"
|
||||||
- Updated existing documentation to reflect the new capabilities
|
- This makes it easier to see connection details in the console
|
||||||
|
|
||||||
## Bug Fixes
|
### Documentation Updates
|
||||||
- Fixed module loading issues by using PSM1 file and NestedModules
|
- Updated all documentation and examples to use the new automatic connection handling
|
||||||
- Fixed type mismatch between ProxmoxConnectionInfo and ProxmoxConnection classes
|
- Added documentation for the new `Test-ProxmoxConnection` cmdlet
|
||||||
|
- Updated the README.md examples to use the default connection
|
||||||
|
|
||||||
|
## Usage Examples
|
||||||
|
|
||||||
|
**Old way (explicit connection):**
|
||||||
|
```powershell
|
||||||
|
$connection = Connect-ProxmoxServer -Server "proxmox.example.com" -Credential (Get-Credential)
|
||||||
|
$vms = Get-ProxmoxVM -Connection $connection
|
||||||
|
Disconnect-ProxmoxServer -Connection $connection
|
||||||
|
```
|
||||||
|
|
||||||
|
**New way (automatic connection):**
|
||||||
|
```powershell
|
||||||
|
Connect-ProxmoxServer -Server "proxmox.example.com" -Credential (Get-Credential)
|
||||||
|
$vms = Get-ProxmoxVM
|
||||||
|
$connection = Test-ProxmoxConnection -Detailed
|
||||||
|
Disconnect-ProxmoxServer -Connection $connection
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
1. Download the ZIP file
|
1. Download the ZIP file
|
||||||
|
|||||||
Reference in New Issue
Block a user