feat: Add -IncludeGuestAgent parameter for performance optimization

- Added optional -IncludeGuestAgent parameter to Get-ProxmoxVM cmdlet
- Guest agent data retrieval is now optional for improved query performance
- Default behavior: Fast queries without guest agent data
- Use -IncludeGuestAgent switch when detailed network information is needed
- Significant performance improvement for normal VM queries
- Updated all documentation and examples to use new parameter
- Fixed binary module structure by removing unnecessary PSD1 from bin folder
- Version bump to 2025.05.30.2323

BREAKING CHANGE: Get-ProxmoxVM no longer fetches guest agent data by default.
Existing scripts that rely on guest agent data must add -IncludeGuestAgent parameter.
This commit is contained in:
AX-AMote
2025-05-30 23:25:19 -04:00
parent 33898b7b80
commit d9bd620168
10 changed files with 174 additions and 57 deletions
+8 -1
View File
@@ -43,11 +43,18 @@ dotnet build "$rootPath\PSProxmox\PSProxmox.Main.csproj" -c Release -o $releaseB
# Copy the module files to the release directory
Copy-Item -Path "$rootPath\Module\PSProxmox.psd1" -Destination $releaseVersionDir -Force
Copy-Item -Path "$rootPath\Module\PSProxmox.psm1" -Destination $releaseVersionDir -Force
Copy-Item -Path "$rootPath\LICENSE" -Destination $releaseVersionDir -Force
Copy-Item -Path "$rootPath\README.md" -Destination $releaseVersionDir -Force
Copy-Item -Path "$scriptRoot\Install-PSProxmox.ps1" -Destination $releaseVersionDir -Force
# Copy the lib directory with dependencies
$libSourceDir = "$rootPath\Module\lib"
$libDestDir = "$releaseVersionDir\lib"
if (Test-Path -Path $libSourceDir) {
Copy-Item -Path $libSourceDir -Destination $libDestDir -Recurse -Force
Write-Host "Copied lib directory to release"
}
# Make sure the bin directory exists in the release directory
if (-not (Test-Path -Path "$releaseVersionDir\bin")) {
New-Item -Path "$releaseVersionDir\bin" -ItemType Directory -Force | Out-Null