[CmdletBinding()] param([string]$Python='python',[string]$HostName,[string]$UserName='root',[string]$Release,[switch]$WithoutSSC,[switch]$Load) $ErrorActionPreference='Stop' $scriptArgs=@('-X','utf8','-B',"$PSScriptRoot/../tools/install_mister.py",'--user',$UserName) if ($HostName) {$scriptArgs+=@('--host',$HostName)} if ($Release) {$scriptArgs+=@('--release',$Release)} if ($WithoutSSC) {$scriptArgs+='--without-ssc'} if ($Load) {$scriptArgs+='--load'} & $Python @scriptArgs if ($LASTEXITCODE -ne 0) {throw 'Install failed; inspect output and preserve the backup/staging directory.'}