never mind don't do that (WUServer)
This commit is contained in:
@@ -28,18 +28,6 @@ $WUServer = (Get-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\WindowsU
|
|||||||
|
|
||||||
## Functions
|
## 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 {
|
Function ImportPSWindowsUpdate {
|
||||||
Write-Host -ForegroundColor Yellow "Importing PS Windows Update module..."
|
Write-Host -ForegroundColor Yellow "Importing PS Windows Update module..."
|
||||||
# Write-LogEntry -Value "Importing PS Windows Update Module..." -Severity 1 -Component "ImportPSWindowsUpdate" -FileName $ScriptLog
|
# Write-LogEntry -Value "Importing PS Windows Update Module..." -Severity 1 -Component "ImportPSWindowsUpdate" -FileName $ScriptLog
|
||||||
@@ -150,9 +138,6 @@ Function Write-LogEntry
|
|||||||
|
|
||||||
# Main Program
|
# Main Program
|
||||||
if ($MDT){
|
if ($MDT){
|
||||||
if ($null -eq $WUServer) {
|
|
||||||
SetWUServer
|
|
||||||
}
|
|
||||||
$ScriptLog = "$MDTPath\_Logs\$env:ComputerName-WindowsUpdate.log"
|
$ScriptLog = "$MDTPath\_Logs\$env:ComputerName-WindowsUpdate.log"
|
||||||
} else {
|
} else {
|
||||||
$ScriptLog = "$env:SystemDrive\irnh\PSWindowsUpdate.log"
|
$ScriptLog = "$env:SystemDrive\irnh\PSWindowsUpdate.log"
|
||||||
|
Reference in New Issue
Block a user