diff --git a/MDT-WinUpdate.ps1 b/MDT-WinUpdate.ps1 index b6f81e9..a9817f6 100644 --- a/MDT-WinUpdate.ps1 +++ b/MDT-WinUpdate.ps1 @@ -28,18 +28,6 @@ $WUServer = (Get-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\WindowsU ## Functions -Function SetWUServer { - if (!(test-path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate)){ - New-Item -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate" - } - New-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate" -Name WUServer -Value "http://fluttershy.technolog.net:8530" - New-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate" -Name WUStatusServer -Value "http://fluttershy.technolog.net:8530" - if (!(test-path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU)){ - New-Item -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" - } - New-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate" -Name UseWUServer -Value 0 - -} Function ImportPSWindowsUpdate { Write-Host -ForegroundColor Yellow "Importing PS Windows Update module..." # Write-LogEntry -Value "Importing PS Windows Update Module..." -Severity 1 -Component "ImportPSWindowsUpdate" -FileName $ScriptLog @@ -150,9 +138,6 @@ Function Write-LogEntry # Main Program if ($MDT){ - if ($null -eq $WUServer) { - SetWUServer - } $ScriptLog = "$MDTPath\_Logs\$env:ComputerName-WindowsUpdate.log" } else { $ScriptLog = "$env:SystemDrive\irnh\PSWindowsUpdate.log"