• Hello Mike

    Thanks for the response. We initially pushed out thru Intune some GPO's. Now we just want to reset to Windows 10 factory settings. I put together some code below? Do you think I can execute to reset all back to default, without a reboot? Afterwards we will request employee to reboot.

    What do you think?

    Jerry

       #  Clear GPO Config   #
       #     by Jerry             #
      #    Last Updated     #
     #     09-18-2019      #
    #######################

    if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
        if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
            $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArgument
            Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
        Exit
        }
    }

    RD /S /Q "%WinDir%System32GroupPolicyUsers"
    RD /S /Q "%WinDir%System32GroupPolicy"

  • jerry gomez became a registered member 3 weeks, 5 days ago