Securing Windows Server 2016 — Question 111

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this sections, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
Your network contains an Active Directory domain named contoso.com. The domain contains a computer named Computer1 that runs Windows10.
The network uses the 172.16.0.0/16 address space.
Computer1 has an application named App1.exe that is located in D:\Apps\. App1.exe is configured to accept connections on TCP port 8080.
You need to ensure that App1.exe can accept connections only when Computer1 is connected to the corporate network.
Solution: You run the New-NetFirewallRule ""DisplayName "Rule1" ""Direction Inbound
""Program "D:\Apps\App1.exe" ""Action Allow -Profile Domain command.
Does this meet the goal?

Answer options

Correct answer: A

Explanation

The command creates a firewall rule that allows inbound connections for App1.exe only when the computer is connected to the Domain profile, which is appropriate for the corporate network setting. Other profiles, such as Public or Private, would not allow these connections, ensuring that App1.exe is restricted to the corporate network. Therefore, the solution meets the requirement.