Backup and Restore Local Group Policy Settings in Windows 10  

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #10

    Odd. When you run the .vbs file from Option 1, were you prompted by UAC to click on Yes?
      My Computers


  2. Posts : 11
    Windows 10
       #11

    uac, popped up and i clicked on yes
      My Computer


  3. Posts : 11
    Windows 10
       #12

    running it thru powershell, outputs this

    https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
    https:/go.microsoft.com/fwlink/?LinkID=135170. : The term 'https:/go.microsoft.com/fwlink/?LinkID=135170.' is not
    recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
    a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (https:/go.micro...?LinkID=135170.:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\WINDOWS\system32> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):

    what am I doing wrong?
      My Computer


  4. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #13

    This is the script below in the .vbs file.

    It basically is suppose to copythe 3 folders at the top of the tutorial into a "Local-Group-Policy-Backup" folder on your desktop.


    Code:
    If WScript.Arguments.length =0 Then
      		
    Set objShell = CreateObject("Shell.Application")
    objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1 
    
    Else 
    Set oShell = WScript.CreateObject ("WScript.Shell")
    
    oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine"),0
    
    oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User %userprofile%\Desktop\Local-Group-Policy-Backup\User"),0
    
    oShell.run ("cmd.exe /c xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers %userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers"),0
    
    End If
      My Computers


  5. Posts : 11
    Windows 10
       #14

    very bizarre, as to why it won't run properly, i'll play around some more

    thx!
      My Computer


  6. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #15

    Terra99 said:
    very bizarre, as to why it won't run properly, i'll play around some more

    thx!
    What happens when you manually run the commands from the script below in an elevated command prompt?

    Code:
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine
    
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User %userprofile%\Desktop\Local-Group-Policy-Backup\User
    
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers %userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers
      My Computers


  7. Posts : 11
    Windows 10
       #16

    trying it now....
    same output on the other commands too

    output from admin command prompt
    C:\WINDOWS\system32>xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine %userprofile%\Desktop\Local-Group-Policy-Backup\Machine
    Invalid number of parameters

    can't say I've ever had these issues before...lol
      My Computer


  8. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #17

    As a test, try these with the desktop path wrapped in quotes now.

    Code:
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\Machine "%userprofile%\Desktop\Local-Group-Policy-Backup\Machine"
    
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicy\User "%userprofile%\Desktop\Local-Group-Policy-Backup\User"
    
    xcopy /c /e /h /i /q /y %SystemRoot%\System32\GroupPolicyUsers "%userprofile%\Desktop\Local-Group-Policy-Backup\GroupPolicyUsers"
      My Computers


  9. Posts : 8
    7 & 10
       #18

    Apply local non-admin policy issue


    I've reviewed this thread and a few others that are applicable and am finding the non-admin policy isn't applying when a non-user logs in. I've installed the non-admin local policy editor, made my changes and saved the console. I run the backup and it creates the folder just fine and I move the folder and the backup & restore scripts to the network. I log in as a non-admin user, copy the restore script and folder back to the desktop and run the restore. It says it's successful, and I reboot. When logging back in as the non-admin user, I still can't modify the items I've set in the policy.

    Any suggestions? O/S is Win10 Pro.
      My Computer


  10. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #19

    rl24712 said:
    I've reviewed this thread and a few others that are applicable and am finding the non-admin policy isn't applying when a non-user logs in. I've installed the non-admin local policy editor, made my changes and saved the console. I run the backup and it creates the folder just fine and I move the folder and the backup & restore scripts to the network. I log in as a non-admin user, copy the restore script and folder back to the desktop and run the restore. It says it's successful, and I reboot. When logging back in as the non-admin user, I still can't modify the items I've set in the policy.

    Any suggestions? O/S is Win10 Pro.

    Hello rl24712,

    I'm afraid you would have to be signed in as an administrator to back up and restore the group policies.
      My Computers


 

Tutorial Categories

Backup and Restore Local Group Policy Settings in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:13.
Find Us




Windows 10 Forums