[Parameter(Mandatory = $false)] [switch]$Force,
else Write-ColorOutput "Installation failed!" "Red" return $false update powershell version
Write-ColorOutput "Installing PowerShell on Windows..." "Cyan" [Parameter(Mandatory = $false)] [switch]$Force
.NOTES Author: PowerShell Update Tool Requires: PowerShell 5.1 or higher (self-updating capability) #> update powershell version
.PARAMETER Preview Install the latest preview version instead of stable.
function List-InstalledVersions $os = if ($env:OS -eq "Windows_NT") "Windows" elseif ($IsMacOS) "macOS" elseif ($IsLinux) "Linux"