Write-ColorOutput "Target PowerShell Version: $targetVersion" "Cyan" $currentVersion = version $newVersion = [version]$targetVersion
function Show-CurrentVersionInfo Write-Host "`nPowerShell Version Information:" -ForegroundColor Cyan Write-Host " Version: $($PSVersionTable.PSVersion)" Write-Host " Edition: $($PSVersionTable.PSEdition)" Write-Host " GitCommitId: $($PSVersionTable.GitCommitId)" Write-Host " OS: $($PSVersionTable.OS)" Write-Host " Platform: $($PSVersionTable.Platform)"
.PARAMETER Force Force reinstall even if current version is latest.
Write-Host "`nAuto-Update Configuration:" -ForegroundColor Cyan Write-Host "1. Auto-check for updates: $($config.AutoCheck)" Write-Host "2. Check interval (days): $($config.CheckIntervalDays)" Write-Host "3. Auto-download updates: $($config.AutoDownload)" Write-Host "4. Auto-install updates: $($config.AutoInstall)" Write-Host "5. Update channel: $($config.Channel)" Write-Host "6. Save and exit"
[Parameter(Mandatory = $false)] [switch]$Cleanup,
Powershell Version - Update
Write-ColorOutput "Target PowerShell Version: $targetVersion" "Cyan" $currentVersion = version $newVersion = [version]$targetVersion
function Show-CurrentVersionInfo Write-Host "`nPowerShell Version Information:" -ForegroundColor Cyan Write-Host " Version: $($PSVersionTable.PSVersion)" Write-Host " Edition: $($PSVersionTable.PSEdition)" Write-Host " GitCommitId: $($PSVersionTable.GitCommitId)" Write-Host " OS: $($PSVersionTable.OS)" Write-Host " Platform: $($PSVersionTable.Platform)"
.PARAMETER Force Force reinstall even if current version is latest.
Write-Host "`nAuto-Update Configuration:" -ForegroundColor Cyan Write-Host "1. Auto-check for updates: $($config.AutoCheck)" Write-Host "2. Check interval (days): $($config.CheckIntervalDays)" Write-Host "3. Auto-download updates: $($config.AutoDownload)" Write-Host "4. Auto-install updates: $($config.AutoInstall)" Write-Host "5. Update channel: $($config.Channel)" Write-Host "6. Save and exit"
[Parameter(Mandatory = $false)] [switch]$Cleanup,