Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Máy Chủ Windows

Windows Update bị treo ở "Copying Packages to the Update Cache"

Tôi gặp một vấn đề lạ khi cài đặt update trên Windows Server 2016. Host của tôi nhận update từ server WSUS, cố gắng cài đặt tự động, nhưng bị treo ở một vài phần trăm. Khởi động lại wuaserv, restart server, tìm lỗi trong WindowsUpdate.log đều vô ích.

Tôi thử tải cumulative update thủ công từ Windows Update Catalog và cài đặt gói update MSU bằng WUSA (Windows Update Standalone Installer). Nhưng trình cài đặt WUSA bị treo mỗi lần ở Copying packages to the Windows Update cache. Việc cài đặt update kéo dài vô tận…

Tôi đã giải quyết được vấn đề bằng cách reset cache Windows Update cục bộ. Mở command prompt với quyền admin và chạy các lệnh dưới:

net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver

Sau đó đảm bảo tiến trình wuaserv đã dừng và không bị treo. Dễ dàng kiểm tra trạng thái tiến trình bằng code PowerShell sau:

$id = Get-WmiObject -Class Win32_Service -Filter "Name LIKE 'wuauserv'" | Select-Object -ExpandProperty ProcessId
$process = Get-Process -Id $id

Nếu tiến trình đang chạy, hãy dừng nó:

$process| Stop-Process
del /f /q "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
del /f /s /q %SystemRoot%\SoftwareDistribution\*.*
del /f /s /q %SystemRoot%\system32\catroot2\*.*
del /f /q %SystemRoot%\WindowsUpdate.log
net start wuauserv
net start cryptSvc
net start bits
net start msiserver

Sau khi dọn cache, chạy tìm kiếm update. Đảm bảo Windows update giờ được cài đặt đúng cách. Rất có thể giải pháp xóa cache khi cài đặt update bị treo cũng hiệu quả với các phiên bản Windows khác (Windows 10, Windows Server 2019, v.v.).

Có một trường hợp khác mà Windows Server 2016 không thể tải update qua proxy.