Firewall settings problem

I have powershell code that runs on PC01 and modifies stuff on PC02 and it works just fine if the firewall is off at PC02. Can someone help me with the settings of the firewall to make the code work while firewall is on? I don’t like to leave it off.

Hi n1colas, welcome to the forum. This really isn’t a powershell question as you clearly state. With that I’m not sure this is the best place to get help with this.

Either way there is more information needed to give good advice.

Are you referring to windows firewall?

What network profile is set? (Best to avoid public)

Have you followed the instructions on allowing wsman through the firewall?

If this is a one off (PC02 only) then ignore this :slight_smile: and follow Dougs post.

If you have a need to apply firewall settings to allow for remote powershell on a bunch of systems, ping me offline and I can get you a script I wrote for that.