# Set TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Trust PSGalley Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted # Install Module Install-Module -Name PolicyFileEditor -Force # Define Local GPO file location for Machine $MachineDir = "$env:windir\system32\GroupPolicy\Machine\Registry.pol" # Remove Local GPO settings Remove-PolicyFileEntry -ValueName "DisableDualScan" -Key "Software\Policies\Microsoft\Windows\WindowsUpdate" -Path $MachineDir Remove-PolicyFileEntry -ValueName "WUServer" -Key "Software\Policies\Microsoft\Windows\WindowsUpdate" -Path $MachineDir Remove-PolicyFileEntry -ValueName "WUStatusServer" -Key "Software\Policies\Microsoft\Windows\WindowsUpdate" -Path $MachineDir Remove-PolicyFileEntry -ValueName "UseWUServer" -Key "Software\Policies\Microsoft\Windows\WindowsUpdate\AU" -Path $MachineDir