Archive for December, 2018

You cannot turn on Network Discovery in Network and Sharing Center in Windows Server

Assume that you try to turn on Network Discovery on a computer that is running any version of Windows Server. To do this, you change the Advanced sharing settings in Network and Sharing Center. However, the changes are not saved. Therefore, you cannot turn on Network Discovery, and you experience the following issues:

  • You cannot browse or find any network share.
  • You cannot view shared folders on a local network.

This issue occurs for one of the following reasons:

  • The dependency services for Network Discovery are not running.
  • The Windows firewall or other firewalls do not allow Network Discovery.

To resolve the issue, follow these steps:

  1. Make sure that the following dependency services are started:
  2. DNS Client
  3. Function Discovery Resource Publication
  4. SSDP Discovery
  5. UPnP Device Host


Configure the Windows firewall to allow Network Discovery. To do this, follow these steps:

  1. Open Control Panel, click System and Security, and then click Windows Firewall.
  2. In the left pane, click Allow an app or feature through Windows Firewall if you are running Windows Server 2012. Or, click Allow a program or feature through Windows Firewall if you are running Windows Server 2008 or Windows Server 2008 R2.
  3. Click Change settings. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
  4. Select Network discovery, and then click OK.


Configure other firewalls in the network to allow Network Discovery.

Turn on Network Discovery in Network and Sharing Center.


Redirect new users and new computers to different OU in Active Directory

I’m sure everyone knows this but it’s often forgotten and not used.  I find it useful to redirect new users and new computers joined to the domain to go to an OU where you can create policies.  Never mind why Microsoft didn’t do this in the first place.

Here are the two commands to redirect users and computers respectively.

Redirect users to different container:  redirusr <DN path to alternate OU>

  1. Ex: redirusr “OU=Users,OU=My Office,DC=domain,dc=local”

Redirect computers to different OU:  redircmp container-dn container-dn

  1. Ex: redircmp “OU=Computers,OU=My Office,DC=domain,dc=local”
Categories: Active Directory

Deleting directory with long names inside

When you want to completely delete a directory and it has file with long names inside it, Robocopy does a VERY good job.  The type of folders in this case could be Favorites with URLs that are really long.  When this happens the folder/file path becomes too long for Windows to delete properly.

Open Cmd.exe prompt as administrator.

Type the following commands:

  1. mkdir “empty_dir”
  2. robocopy “empty_dir” “the_dir_to_delete” /s /mir
  3. rmdir “empty_dir”
  4. rmdir “the_dir_to_delete”