The following instructions are for Windows 10 but the procedure is similar for other or older versions of Windows.
1. Open the Control Panel and select "Windows Defender Firewall" under the category "System and Security".
2. Now click on the option "Allow an app or feature through Windows Defender Firewall" on the left.
3. Here you will now find all applications that are monitored by the firewall. If you do not find the desired programme in the list, you can add it via the button "Allow other app".
4. Place a tick to the left of the programme, as well as the ticks for public and private networks on the right-hand side.
5. Click the "OK" button to save your settings and add the exception.
6. Note: If you cannot set any check marks, you must first click on the "Change settings" button at the top.