Skip to content

Instantly share code, notes, and snippets.

@NarmakTwo
Created January 25, 2026 15:27
Show Gist options
  • Select an option

  • Save NarmakTwo/c8e67587eb9d39113e663e46451c5ea8 to your computer and use it in GitHub Desktop.

Select an option

Save NarmakTwo/c8e67587eb9d39113e663e46451c5ea8 to your computer and use it in GitHub Desktop.
powershell -NoProfile -Command "Start-Process powershell -Verb RunAs -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command """"\"java.exe\",\"javaw.exe\" | %% { New-NetFirewallRule -DisplayName \"Allow Java %% Inbound\" -Direction Inbound -Action Allow -Program \"*\\%%\" -Profile Any; New-NetFirewallRule -DisplayName \"Allow Java %% Outbound\" -Direction Outbound -Action Allow -Program \"*\\%%\" -Profile Any }\""""'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment