# ============================================================ # KBSUPPORT TOOLS # https://tools.kbsupport.de # ============================================================ $BaseUrl = "https://tools.kbsupport.de" # ------------------------------------------------------------ # Farben # ------------------------------------------------------------ $ESC = [char]27 $Orange = "$ESC[38;2;255;128;0m" $Reset = "$ESC[0m" # ------------------------------------------------------------ # Remote-Script laden und im aktuellen Fenster ausführen # ------------------------------------------------------------ function Start-KBRemoteScript { param ( [Parameter(Mandatory)] [string]$Path ) $Url = "$BaseUrl/$Path" Clear-Host Write-Host "" Write-Host "${Orange}========================================${Reset}" Write-Host "${Orange} KBSUPPORT TOOLS${Reset}" Write-Host "${Orange}========================================${Reset}" Write-Host "" Write-Host "Tool wird geladen..." -ForegroundColor DarkGray Write-Host "" try { $Script = Invoke-RestMethod ` -Uri $Url ` -ErrorAction Stop # Script im gleichen PowerShell-Prozess ausführen # Kein neues Fenster! $ScriptBlock = [scriptblock]::Create($Script) & $ScriptBlock } catch { Write-Host "" Write-Host "${Orange}FEHLER${Reset}" Write-Host "" Write-Host $_.Exception.Message -ForegroundColor Red } Write-Host "" Write-Host "----------------------------------------" -ForegroundColor DarkGray Write-Host "" Write-Host "ENTER drücken, um zum Hauptmenü zurückzukehren..." -ForegroundColor DarkGray Read-Host | Out-Null } # ------------------------------------------------------------ # Hauptmenü # ------------------------------------------------------------ do { Clear-Host Write-Host "" Write-Host "${Orange}========================================${Reset}" Write-Host "${Orange} KBSUPPORT TOOLS${Reset}" Write-Host "${Orange}========================================${Reset}" Write-Host "" Write-Host " Computer:" -ForegroundColor DarkGray -NoNewline Write-Host " $env:COMPUTERNAME" Write-Host " Benutzer:" -ForegroundColor DarkGray -NoNewline Write-Host " $env:USERNAME" Write-Host "" Write-Host "----------------------------------------" -ForegroundColor DarkGray Write-Host "" # Hardwarecheck Write-Host " ${Orange}[1]${Reset} Hardwarecheck" Write-Host " Hardware und Windows-Informationen anzeigen" ` -ForegroundColor DarkGray Write-Host "" # Remote Support Write-Host " ${Orange}[2]${Reset} Remote Support" Write-Host " Remote-Support-Tool herunterladen und starten" ` -ForegroundColor DarkGray Write-Host "" # Standardsoftware Write-Host " ${Orange}[3]${Reset} Standardsoftware" Write-Host " Vorgefertigten Ninite-Installer starten" ` -ForegroundColor DarkGray Write-Host "" # Windows Tools Write-Host " ${Orange}[4]${Reset} Windows Tools" Write-Host " Windows-Wartung und Hilfsprogramme" ` -ForegroundColor DarkGray Write-Host "" # Netzwerk Tools Write-Host " ${Orange}[5]${Reset} Netzwerk Tools" Write-Host " Netzwerkdiagnose und Konfiguration" ` -ForegroundColor DarkGray Write-Host "" # Beenden Write-Host " ${Orange}[Q]${Reset} Beenden" Write-Host "" Write-Host "----------------------------------------" -ForegroundColor DarkGray Write-Host "" $Choice = Read-Host " Auswahl" # -------------------------------------------------------- # Auswahl # -------------------------------------------------------- switch ($Choice.ToUpper()) { "1" { Start-KBRemoteScript "hardwarecheck.ps1" } "2" { Start-KBRemoteScript "remote.ps1" } "3" { Start-KBRemoteScript "ninite.ps1" } "4" { Start-KBRemoteScript "windows-menu.ps1" } "5" { Start-KBRemoteScript "network-menu.ps1" } "Q" { Clear-Host Write-Host "" Write-Host "${Orange}KBSUPPORT Tools beendet.${Reset}" Write-Host "" } default { Write-Host "" Write-Host "Ungültige Auswahl." -ForegroundColor Red Start-Sleep -Seconds 1 } } } while ($Choice.ToUpper() -ne "Q")