It will work.
However, the best practice is that domain controllers are left alone (no additional software), no internet connectivity is typically allowed.
If this is a non-critical environment (like a lab) and you are tight in resources, then you can make that call.