none
Cleaned up old GPO's, but they're still in SYSVOL RRS feed

  • Question

  • Hi all, 

    I'm tidying up one of my test domains and have deleted ALL GPOs (via GPMC) with the exception of the Default Domain Policy and the Domain Controllers Policy. 

    There is only 1 DC in the domain, however, when i look under \SYSVOL\domain\Policies, the GPO folders are still present, all 1,970 of them.

    I've attached a screenshot from the DC showing the 2 remaining GPOs, and the 1,970 GPO folders. I've checked the content and it looks like just the folder structure remains, there are no actual files.

    Shouldn't they have been deleted along with the GPOs? Is it safe to delete them manually?





    • Edited by markey165 Monday, October 29, 2018 4:29 PM
    Monday, October 29, 2018 3:17 PM

All replies

  • it should be safe to delete those manually
    Monday, October 29, 2018 3:42 PM
  • Hi,

    Usually this happens if DC's are not replicating or there is a lag/delay in replication between the partners.

    However make sure you have backup of the GUID/GPO folders and as suggested you can delete these folders. Also you need to clean up from ADSIEDIT.msc under policies folders.

    Hope this helps.


    Regards, Jim MSCS - MCP Disclaimer: This posting is provided AS IS with no warranties or guarantees , and confers no rights. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Monday, October 29, 2018 4:50 PM
  • it should be safe to delete those manually

    Its the word "should" i'm worried about.

    Ordinarily my understanding is you shouldn't touch this area directly as things can break.

    I guess i was just trying to get a better understanding of why this happened, and if this is definitely safe to do.

    I may replicate some of this in my live domain, so would like to sure :-)

    Monday, October 29, 2018 5:36 PM
  • Hi,

    Usually this happens if DC's are not replicating or there is a lag/delay in replication between the partners.

    However make sure you have backup of the GUID/GPO folders and as suggested you can delete these folders. Also you need to clean up from ADSIEDIT.msc under policies folders.

    Hi Jim, as per original post, there's only once DC in this domain (which is also the PDC), so no replication involved, and deletion is therefore on the same DC.

    Just checked ADSIEDIT, under default naming context\domain\system\policies there are only 2 polices present, which are the 2 Default polices, so all looks good there.

    Ok cool. Still puzzled why the folders were left, but i'll take a backup, then delete the folders as suggested.

    EDIT: PS my bad, i did some test GPO deletes via GPMC, but I removed the bulk of the GPOs via a Powershell script as there were so many, and from what i can see GPMC only allows you to delete one GPO at a time!

    Monday, October 29, 2018 5:46 PM
  • Hello,

    Can you tell us more about this Powershell script ? How did it delete GPO ?

    If you can us a sample of the script it will help

    Best Regards,

    Tuesday, October 30, 2018 7:26 AM
  • Hello,

    Can you tell us more about this Powershell script ? How did it delete GPO ?

    If you can us a sample of the script it will help

    I just ran a couple of lines to capture the GPOs to a text file, then use the text file to remove them as follows:

    Get-gpo -all | sort-object displayname | select-object -expandproperty displayname | out-file c:\tmp\GPOs.txt

    I then removed the lines for the 2 GPOs i wanted to keep. Then ran:

    Get-Content c:\tmp\gpos.txt | foreach { Get-GPO -Name "$_" | Remove-GPO }

    Maybe doing it this way via Powershell, and not via the GPMC is what left the folders behind?




    • Edited by markey165 Tuesday, October 30, 2018 9:45 AM
    Tuesday, October 30, 2018 9:42 AM
  • The behaviour is strange, what you can do before doing the deletion in the SYSVOL folder is to check if these GPOs were deleted in the container policies in AD :

    Best Regards,

    Thursday, November 1, 2018 8:07 AM
  • Hi,

    Thank you for posting in our forum.

    It is safe to delete the files manually. Thanks to your sharing which will be helpful for any other community member facing the same issue.

    Best regards

    Julie 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, November 5, 2018 5:57 AM
    Moderator