Which PowerShell commands should you run on Computer1?

You administer Windows 10 Enterprise computers in your company network.The computers are configured to allow remote connections.You attempt to create a Remote Desktop Connection to a computer named Computer1.You receive the following message:”Remote Desktop can’t connect to the remote computer.”You are able to ping Computer1.You discover that Remote Desktop Firewall rules are not present on Computer1.You need to connect to Computer1 by using Remote Desktop.Which PowerShell commands should you run on Computer1?-Direction Out -Action Allow:New-NetFirewallRuleCreates a new inbound or outbound firewall rule and adds the rule to the target computer. SyntaxNew-NetFirewallRule -DisplayName [-Action ] [-AsJob] [-Authentication ] [- CimSession ] [-Description ] [-Direction ] [-DynamicTarget ] [-EdgeTraversalPolicy ] [-Enabled ] [-Encryption ] [-GPOSession ] [-Group ] [-IcmpType ] [-InterfaceAlias ] [-InterfaceType ] [-LocalAddress ] [-LocalOnlyMapping ] [-LocalPort ] [-LocalUser ] [-LooseSourceMapping ] [-Name ] [-OverrideBlockRules ] [-Owner ] [- Package ] [-Platform ] [-PolicyStore ] [-Profile ] [-Program ] [-Protocol ] [-RemoteAddress ] [- RemoteMachine ] [-RemotePort ] [-RemoteUser ] [-Service ] [- ThrottleLimit ] [-Confirm] [-WhatIf] [ ] TheNew-NetFirewallRule cmdlet creates an inbound or outbound firewall rule and adds the rule to the target computer.http://en.wikipedia.org/wiki/Remote_Desktop_ProtocolRemote Desktop ProtocolBy default, the server listens on TCP port 3389 and UDP port 3389.References: https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=winserver2012r2-ps

Question:

Which PowerShell commands should you run on Computer1?

Options:

Set-NetFirewallRule -Name RemoteSvcAdmin-in-TCP -Enable True

Set -NetFirewallRule -Name RemoteFwAdmin-In-TCP -Enable True

New-NetFirewallRule -DisplayName RdpTCPin -localPort 3389 – Protocol TCP

New-NetFirewallRule -DisplayName RdpTCPout -localPort 3389 – Protocol TCP

Correct Answer

The Correct Answer for this Question is

New-NetFirewallRule -DisplayName RdpTCPin -localPort 3389 – Protocol TCP

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *