Created
July 17, 2017 18:44
-
-
Save sapslaj/4cde18f4f4197997ff865a7d8096047c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script assumes the Windows Server installation is already joined to a | |
# domain. There might be further tweaks needed to make it work between non- | |
# domain joined computers due to the differences between firewall profiles. | |
# Quick sanity check | |
Enable-PSRemoting | |
winrm qc | |
# Set up firewall display groups to be enabled. | |
# Protip: if you want to find out where to add more to this list, go to the | |
# Windows Firewall with Advanced Security GUI, start the New Inbound Rule | |
# wizard, mark Predefined as the type of rule, then look through the dropdown | |
# to see all of the possible options. | |
$FirewallDisplayGroups = @( | |
"Remote Event Log Management", | |
"Remote Scheduled Tasks Management", | |
"Remote Service Management", | |
"Remote Volume Management", | |
"Windows Firewall Remote Management", | |
"Windows Remote Management" | |
) | |
$FirewallDisplayGroups | foreach { | |
Enable-NetFirewallRule -DisplayGroup $_ | |
echo "Enabled $_" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment