Initial commit

This commit is contained in:
administrator 2026-04-17 00:00:02 +02:00
commit 3808f2247a
1088 changed files with 12591 additions and 0 deletions

View file

@ -0,0 +1,32 @@
#Requires -RunAsAdministrator
$ServiceName = "MailPrint"
$svc = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
if (-not $svc) {
Write-Host "Dienst '$ServiceName' ist nicht installiert." -ForegroundColor Yellow
exit 0
}
# Stoppen
if ($svc.Status -ne "Stopped") {
Write-Host "Stoppe Dienst '$ServiceName'..." -ForegroundColor Cyan
Stop-Service -Name $ServiceName -Force
Start-Sleep -Seconds 3
}
# Loeschen
Write-Host "Entferne Dienst '$ServiceName'..." -ForegroundColor Cyan
sc.exe delete $ServiceName | Out-Null
Start-Sleep -Seconds 2
# Pruefen
$check = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
if ($check) {
Write-Error "Dienst konnte nicht entfernt werden. Bitte manuell pruefen."
exit 1
}
Write-Host ""
Write-Host "Dienst '$ServiceName' erfolgreich deinstalliert." -ForegroundColor Green