Untitled

 avatar
unknown
plain_text
14 days ago
379 B
5
Indexable
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce"
$regName = "OpenPort22"
$regValue = "powershell -Command `"Start-Process -NoNewWindow -FilePath 'netsh' -ArgumentList 'advfirewall firewall add rule name=`"SSH`" dir=in action=allow protocol=TCP localport=22'`""

New-ItemProperty -Path $regPath -Name $regName -Value $regValue -PropertyType String -Force
Editor is loading...
Leave a Comment