Windows Update Checking for Updates forverer, Server 2012 r2

  • Thread starter Thread starter Tzvi Alikian
  • Start date Start date
T

Tzvi Alikian

Guest
Hi,

i"m trying for a several days to fix Windows Update in my Server 2012 r2 i have tried every possible fix

I don't have WSUS, the updates got from microsoft online servers.

When i click "Check for updates" windows says Checking for updates... and its endless.

What i have tried to do to fix this, but it doesn't help much.


<#
.SYNOPSIS
Reset-WindowsUpdate.ps1 - Resets the Windows Update components

.DESCRIPTION
This script will reset all of the Windows Updates components to DEFAULT SETTINGS.

.OUTPUTS
Results are printed to the console. Future releases will support outputting to a log file.

.NOTES
Written by: Ryan Nemeth

Find me on:

* My Blog: SynAck
* Twitter: Ryan Nemeth (@geeky_ryan) | Twitter
* LinkedIn: https://www.linkedin.com/in/ryan-nemeth-b0b1504b/
* Github: rnemeth90 - Overview
* TechNet: Ryan Nemeth's Profile

Change Log
V1.00, 05/21/2015 - Initial version
V1.10, 09/22/2016 - Fixed bug with call to sc.exe
V1.20, 11/13/2017 - Fixed environment variables
#>


$arch = Get-WMIObject -Class Win32_Processor -ComputerName LocalHost | Select-Object AddressWidth

Write-Host "1. Stopping Windows Update Services..."
Stop-Service -Name BITS
Stop-Service -Name wuauserv
Stop-Service -Name appidsvc
Stop-Service -Name cryptsvc

Write-Host "2. Remove QMGR Data file..."
Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue

Write-Host "3. Renaming the Software Distribution and CatRoot Folder..."
Rename-Item $env:systemroot\SoftwareDistribution SoftwareDistribution.bak -ErrorAction SilentlyContinue
Rename-Item $env:systemroot\System32\Catroot2 catroot2.bak -ErrorAction SilentlyContinue

Write-Host "4. Removing old Windows Update log..."
Remove-Item $env:systemroot\WindowsUpdate.log -ErrorAction SilentlyContinue

Write-Host "5. Resetting the Windows Update Services to defualt settings..."
"sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
"sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"

Set-Location $env:systemroot\system32

Write-Host "6. Registering some DLLs..."
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll

Write-Host "7) Removing WSUS client settings..."
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f

Write-Host "8) Resetting the WinSock..."
netsh winsock reset
netsh winhttp reset proxy

Write-Host "9) Delete all BITS jobs..."
Get-BitsTransfer | Remove-BitsTransfer

Write-Host "10) Attempting to install the Windows Update Agent..."
if($arch -eq 64){
wusa Windows8-RT-KB2937636-x64 /quiet
}
else{
wusa Windows8-RT-KB2937636-x86 /quiet
}

Write-Host "11) Starting Windows Update Services..."
Start-Service -Name BITS
Start-Service -Name wuauserv
Start-Service -Name appidsvc
Start-Service -Name cryptsvc

Write-Host "12) Forcing discovery..."
wuauclt /resetauthorization /detectnow

Write-Host "Process complete. Please reboot your computer."



In the log "C:\Windows\WindowsUpdate.log" i"m getting this warnings / errors.


2019-06-18 17:37:45:480 16888 302c COMAPI -------------
2019-06-18 17:41:09:164 864 8bc Misc WARNING: IsSessionRemote: WinStationQueryInformationW(WTSIsRemoteSession) failed for session 1, GetLastError=2250
2019-06-18 17:41:11:242 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-18 17:41:11:242 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-18 17:42:58:371 864 8bc AU User login event timer expired for session id: 1.
2019-06-18 17:42:58:371 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-18 17:42:58:371 864 8bc AU #############
2019-06-18 17:42:58:371 864 8bc AU ## START ## AU: Install updates
2019-06-18 17:42:58:371 864 8bc AU #########
2019-06-18 17:42:58:371 864 8bc AU # Initiating scheduled install
2019-06-18 17:42:58:371 864 8bc AU WARNING: There are no approved updates to install
2019-06-18 17:42:58:371 864 8bc AU # Exit code = 0x8024000C
2019-06-18 17:42:58:371 864 8bc AU #########
2019-06-18 17:42:58:371 864 8bc AU ## END ## AU: Install updates
2019-06-18 17:42:58:371 864 8bc AU #############
2019-06-18 18:52:47:481 864 8bc Misc WARNING: IsSessionRemote: WinStationQueryInformationW(WTSIsRemoteSession) failed for session 1, GetLastError=2250
2019-06-18 18:52:49:667 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-18 18:52:49:667 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-18 19:02:27:949 864 8bc Misc WARNING: IsSessionRemote: WinStationQueryInformationW(WTSIsRemoteSession) failed for session 1, GetLastError=2250
2019-06-19 08:42:33:592 864 8bc Misc WARNING: IsSessionRemote: WinStationQueryInformationW(WTSIsRemoteSession) failed for session 1, GetLastError=2250
2019-06-19 08:42:33:592 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-19 08:42:33:607 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-19 08:42:33:748 864 8bc Misc WARNING: IsSessionRemote: WinStationQueryInformationW(WTSIsRemoteSession) failed for session 1, GetLastError=2250
2019-06-19 08:42:34:076 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037
2019-06-19 08:42:34:077 864 8bc AU WARNING: Failed to get Network Cost info from NLM, assuming network is NOT metered, error = 0x80240037




And the updates that already installed in this server 2012 r2

Host Name: MYSERVER
OS Name: Microsoft Windows Server 2012 R2 Standard
OS Version: 6.3.9600 N/A Build 9600
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Server
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00252-60131-43769-XXXXX
Original Install Date: 11/29/2016, 20:20:51
System Boot Time: 06/18/2019, 17:29:19
System Manufacturer: VMware, Inc.
System Model: VMware Virtual Platform
System Type: x64-based PC
Processor(s): 2 Processor(s) Installed.
[01]: Intel64 Family 6 Model 79 Stepping 1 GenuineIntel ~2400 Mhz
[02]: Intel64 Family 6 Model 79 Stepping 1 GenuineIntel ~2400 Mhz
BIOS Version: Phoenix Technologies LTD 6.00, 09/21/2015
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC+02:00) Jerusalem
Total Physical Memory: 22,528 MB
Available Physical Memory: 7,592 MB
Virtual Memory: Max Size: 31,744 MB
Virtual Memory: Available: 10,730 MB
Virtual Memory: In Use: 21,014 MB
Page File Location(s): C:\pagefile.sys
Domain: MyDomain.Local
Logon Server: \\My-DC
Hotfix(s): 10 Hotfix(s) Installed.
[01]: KB2919355
[02]: KB2919442
[03]: KB2934520
[04]: KB2937220
[05]: KB2938772
[06]: KB2939471
[07]: KB2949621
[08]: KB2999226
[09]: KB3151864
[10]: KB4040972
Network Card(s): 1 NIC(s) Installed.
[01]: vmxnet3 Ethernet Adapter
Connection Name: Ethernet0
DHCP Enabled: No
IP address(es)
[01]: 10.XX.X.XXX
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.


I'm exhausted from this mishap, I try to solve the problem for several days and I cannot fix it, I ask for your help in solving the mystery

Thanks all.









Zvi Alikyan

Continue reading...
 
Back
Top