A Quick Tip To Check For Morphed Folders In An Active Directory Forest
This article explains the easiest way to check for morphed folders in an Active Directory forest. This article uses a small script to scan all the domain controllers to check for morphed folders. The morphed folders are generated in SYSVOL share if you copy SYSVOL contents manually to SYSVOL share on another domain controller.
- Get the list of domain controllers in forest. To do this, run the following command:
- Dsquery server -r rdn -forest > C:\DCList.txt
- The DC List will be stored in the DCList.TXT file. You need to use this file with the FOR command as shown below:
- FOR /F "Tokens=*" %L IN (C:\DCList.txt) DO DIR /s \\%L\SYSVOL | Find /i "_NTFRS" >> C:\Result.TXT
The above FOR command runs against each DC in DCList.txt and looks for _NTFRS folder in SYSVOL share. If it finds it returns the name of the folder. The end results will be stored in the C:\Result.txt.
For more information on Morphed folders, please check out here: