Initialize with private Repo

This commit is contained in:
Debian
2026-04-02 15:34:53 +02:00
commit 7045282378
51 changed files with 1686 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
Write-Host "Deaktiviere PowerShell Remoting..." -ForegroundColor Yellow
# Autostart deaktivieren
Write-Host "Deaktiviere WinRM Autostart..."
Set-Service WinRM -StartupType Disabled
# WinRM Dienst stoppen
if (Get-Service WinRM -ErrorAction SilentlyContinue) {
Write-Host "Stoppe WinRM Dienst..."
Stop-Service WinRM -Force
}
# Listener entfernen
Write-Host "Entferne WinRM Listener..."
winrm delete winrm/config/Listener?Address=*+Transport=HTTP 2>$null
winrm delete winrm/config/Listener?Address=*+Transport=HTTPS 2>$null
# Firewallregeln deaktivieren
Write-Host "Deaktiviere Firewall Regeln..."
Disable-NetFirewallRule -DisplayGroup "Windows Remote Management"
# LocalAccountTokenFilterPolicy zurücksetzen
Write-Host "Setze LocalAccountTokenFilterPolicy zurück..."
$path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
if (Test-Path $path) {
Set-ItemProperty -Path $path -Name LocalAccountTokenFilterPolicy -Value 0 -Type DWord
}
Write-Host "PowerShell Remoting wurde deaktiviert." -ForegroundColor Green