Restoring GPO from Backup does not restore it completely ?

touqeeranjum 80 Reputation points
2023-02-01T08:09:03.3766667+00:00

Hi,

I have tested this several times, I make a GPO backup and restore it in a different machine and the backup does not restore the GPO completely. In particular the Network Manager List - Network Name Value is not restored, however, when I check the GPO after restore it shows the value exists in the GPO, upon reboot the value is lost from the restored GPO.

Any idea on how to get this working, or is this a bug ?

Thank You

Windows for business | Windows Server | User experience | Other
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2023-02-01T09:34:50.6066667+00:00

    Hi,

    When you Open GPMC be sure that you are connecting on your PDC and try to import GPO setting from restored GPO .

    If you still have same behavior , run dcdiag to check the DC health and sysvol replication.

    ***Please don't forget to mark helpful answer


  2. Limitless Technology 44,751 Reputation points
    2023-02-02T09:13:50.2066667+00:00

    Hello there,

    Do you get any error messages ?

    Instead of restoring the GPO, create a new empty GPO then right-click on it and choose import settings. The backup that you exported from SCM will show up here and you can import all the settings to the new GPO.

    Also try the below Scritp and see if that helps,

    Import-Module GroupPolicy

    New-GPO -Name "Homelab"

    Import-GPO -BackupGpoName "Homelab" -TargetName "Homelab" -Path C:\

    Get-GPO -Name "Homelab" | New-GPLink -Target "dc=homelab,dc=lab" -LinkEnabled Yes -Enforced Yes

    https://learn.microsoft.com/en-us/powershell/module/grouppolicy/restore-gpo?view=windowsserver2022-ps

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  3. touqeeranjum 80 Reputation points
    2023-02-02T09:23:44.8+00:00

    Hi,,

    Just so there is clarity in the post.

    I make the backup with the Backup-GPO command, and restore it the same way as in @Limitless Technology script which is when this problem happens, I'm automating this so I'm using powershell for this, but it doesn't restore the Network Manager List - Network Name.

    So I tried backing up manually and restoring manually, this way works fine.

    Unsure whats going on.

    0 comments No comments

  4. touqeeranjum 80 Reputation points
    2023-02-02T13:08:06.3266667+00:00

    Hi,

    Just so there is clarity in the post. I make the backup with the Backup-GPO command, and restore it the same way as in @Limitless Technology script which is when this problem happens, I'm automating this so I'm using powershell for this, but it does not work as expected.

    There is no error when restoring with Powershell.

    $gpoPath = Join-Path -Path $PSScriptRoot -ChildPath "HLABGPO"

    Import-Module GroupPolicy

    New-GPO -Name "HLAB"

    Import-GPO -BackupGpoName "HLAB" -TargetName "HLAB" -Path $gpoPath

    Get-GPO -Name "HLAB" | New-GPLink -Target "dc=hlab,dc=lab" -LinkEnabled Yes - Enforced Yes

    gpupdate /force

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.