Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Autoelevator
- if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
- #Add firewall rule of your liking.
- netsh advfirewall firewall add rule name="Webserver autoconfig 7777 TCP INBOUND" dir=in action=allow protocol=TCP localport=7777
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement