Powershell – Windows Firewall

SQL Server Ports laut Microsoft Doku

New-NetFirewallRule -DisplayName „SQL TCP eingehend“ -Description „SQL TCP eingehend Ports 135, 1433, 1434, 4022“ -Direction Inbound -Protocol TCP -LocalPort 135, 1433, 1434 , 4022 -Action Allow -Profile Any

New-NetFirewallRule -DisplayName „SQL UDP eingehend“ -Description „SQL UDP eingehend Port 1434“ -Direction Inbound -Protocol UDP -LocalPort 1434 -Action Allow -Profile Any

Alle Arcserveregeln für Alle Netzwerke (Privat, Öffentlich und Domäne) erlauben

Get-NetFirewallRule | Where-Object description -like *Arcserve* | Set-NetFirewallRule -Profile Any

ELBA5

New-NetFirewallRule -DisplayName „ELBA5 TCP eingehend“ -Description „ELBA5 eingehend Port 2640“ -Direction Inbound -Protocol TCP -LocalPort 2640 -Action Allow -Profile Any

Powershell -Aufgaben planen

WindowsDefender automatisch updaten

Aktualisiert den Windows Defender täglich um 03:00 Uhr

$trig = New-ScheduledTaskTrigger -Daily -At 3:00 -DaysInterval 1
$conf = New-ScheduledTaskSettingsSet
$action = New-ScheduledTaskAction -Execute „C:\Program Files\Windows Defender\MpCmdRun.exe“ -Argument „-signatureUpdate“
$princ = New-ScheduledTaskPrincipal -RunLevel Highest -UserId „LOCALSERVICE“ -LogonType ServiceAccount
Register-ScheduledTask -TaskName „Update Windows Defender“ -TaskPath „\Eigene“ -Principal $princ -Action $action -Settings $conf -Trigger $trig