Eine Remotesitzung über Enter-PSSession muss hergestellt sein. Siehe hier.

$url = "https://installer.bea-brak.de/cs/installation/1/beAClientSecurity-Installation.zip"
$outputPath = "C:\Temp\"
$outputFile = "beAClientSecurity-Installation.zip"
if (-Not(Test-Path "c:\temp")) {
New-Item -Path "c:\" -Name "Temp" -ItemType "directory"
}
Invoke-WebRequest -Uri $url -OutFile (Join-Path -Path $outputPath -ChildPath $outputFile)
Expand-Archive (Join-Path -Path $outputPath -ChildPath $outputFile) $outputPath
$app = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "bea*" }
$app | foreach-object {$_.uninstall()}
TASKKILL /F /IM beAClientSecurity.exe /T
Remove-Item "C:\Program Files (x86)\BRAK" -Recurse -Force
$runcmd = Join-Path -Path $outputPath -ChildPath "beAClientSecurity-Installation.exe"
Start-Process $runcmd -ArgumentList "-q" -wait