Edit the Default Domain Policy or create a new policy and make the following edit:
Computer Config->Policies->Windows Settings->Security Setttings->System Services
and switching Function Discovery Resource Publication to automatic.