Hi there,
Before running this Powershell command make sure you have created the Outbound & Inbound Port Rule.
By default, Windows Defender Firewall allows all outbound network traffic unless it matches a rule that prohibits the traffic. By default, Windows Defender Firewall block all inbound network traffic unless it matches a rule that allow the traffic.
Windows Firewall - Block all traffic by default unless traffic matches explicitly defined rules https://learn.microsoft.com/en-us/answers/questions/47481/windows-firewall-block-all-traffic-by-default-unle.html
Create an Outbound Port Rule https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-firewall/create-an-outbound-port-rule Turn on Windows Defender Firewall with Advanced Security and Configure Default Behavior
https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-firewall/turn-on-windows-firewall-and-configure-default-behavior Hope this resolves your Query !!
------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–