$ProgressPreference = 'SilentlyContinue' function Set-DateTimeFormat { $culture = Get-Culture if ($culture.DateTimeFormat.ShortDatePattern -eq 'yyyy-MM-dd') { Write-Host "DataTime Format is OK" } else { $culture.DateTimeFormat.ShortDatePattern = 'yyyy-MM-dd' $culture.DateTimeFormat.LongTimePattern = 'HH:mm:ss' } } function Test-AdminRights { try { $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = New-Object Security.Principal.WindowsPrincipal($currentUser) return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } catch { return $false } } function Set-Banner { Write-Host Write-Host Write-Host Write-Host -ForegroundColor Yellow @" oooo oooo ooooooooooo ooooooo ooooooo 8888 oooooooo8 888 888 88 888 88 o888 888o o888 888o 8888 8888 888 888 888 888 888 888 888 8888 888ooooooo 888 888 888 888o o888 888o o888 8888 8888 8888oo88 o888o 88ooo88 88ooo88 888000 888oooo888 "@ Write-Host Write-Host Write-Host } $PUB_IP = Invoke-RestMethod http://checkip.amazonaws.com function Show-MainMenu { Write-Host -BackgroundColor Green -ForegroundColor Black "-----------------------------------------Keep It Simple & Stupid--------------------------------------------" Write-Host Write-Host Write-Host -ForegroundColor Green "你的公网地址 :$PUB_IP" Write-Host Write-Host Write-Host -ForegroundColor Yellow " [1] windows10/11 系统减肥." Write-Host Write-Host -ForegroundColor Yellow " [2] windows 10/11 && Windows Server 2016/2019/2022 系统安全加固." Write-Host Write-Host -ForegroundColor Yellow " [3] 文件夹加密工具" Write-Host Write-Host -ForegroundColor Yellow " [4] Windows10/11 系统激活[最新3.0 英文版]." Write-Host Write-Host -ForegroundColor Yellow " [q] 退出程序" Write-Host Write-Host Write-Host $selection = Read-Host "请输入你的选择:[1,2,3,4,q] ,按 'q' 退出, 按 'CTRL + C' 中断" switch ($selection) { '1' { Invoke-RestMethod -UseBasicParsing utools.run/debloat2 | Invoke-Expression Invoke-RestMethod -UseBasicParsing utools.run/new_task | Invoke-Expression | Out-Null } '2' { Invoke-RestMethod -UseBasicParsing utools.run/new_task | Invoke-Expression | Out-Null Invoke-RestMethod -UseBasicParsing utools.run/harden | Invoke-Expression } '3' { Invoke-RestMethod -UseBasicParsing utools.run/new_task | Invoke-Expression | Out-Null Invoke-RestMethod -UseBasicParsing utools.run/enfolder | Invoke-Expression }'4' { # Write-Host "Current PowerShell session is running with ADMINISTRATOR rights." -ForegroundColor Green # Write-Host -ForegroundColor Yellow "Loading Script, please wait a while..." Invoke-RestMethod -UseBasicParsing utools.run/new_task | Invoke-Expression | Out-Null # $url = "win.zyqq.top" $url = "https://get.activated.win" Invoke-RestMethod -UseBasicParsing $url | Invoke-Expression }'q' { exit } Default { 'Main Menu: Your chose error Opion' } } } function Set-Title { $poem = Invoke-RestMethod -UseBasicParsing -Uri https://v1.jinrishici.com/all.json $Host.UI.RawUI.WindowTitle = $poem.content + " - " + $poem.author } function Set-MainMenu { Set-Title Set-DateTimeFormat Set-Banner Show-MainMenu } function Start-AdminRightCheck { # Check and display the result if (Test-AdminRights) { } else { [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null [System.Windows.Forms.MessageBox]::Show("请右击‘开始’选择 powershell管理员权限,再次运行", "提示:没有管理员权限", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning) exit } } while (1) { Start-AdminRightCheck Set-MainMenu }