Dọn rác Windows nhanh, giải phóng ổ C
Xoá file tạm, cache Windows Update, thùng rác và mở Disk Cleanup — an toàn, không đụng tới dữ liệu cá nhân.
⚠ Đọc kỹ nội dung script trước khi chạy — nội dung đầy đủ ở khung bên dưới.
@echo off
net session >nul 2>&1 || (echo Hay chay voi quyen Administrator! & pause & exit /b)
echo Dang don file tam...
del /q /f /s "%TEMP%\*" >nul 2>&1
del /q /f /s "C:\Windows\Temp\*" >nul 2>&1
echo Dang don cache Windows Update...
net stop wuauserv >nul 2>&1
rd /s /q "C:\Windows\SoftwareDistribution\Download" >nul 2>&1
net start wuauserv >nul 2>&1
echo Dang don thung rac...
PowerShell -NoProfile -Command "Clear-RecycleBin -Force -ErrorAction SilentlyContinue"
echo Mo Disk Cleanup...
cleanmgr /sagerun:1
echo Xong!
pause
Script sẽ dọn
%TEMP%vàC:\Windows\Temp- Cache Windows Update (
SoftwareDistribution\Download) - Thùng rác của tất cả ổ đĩa
Chạy bằng quyền Administrator.
Bài liên quan
Sửa lỗi kết nối máy in share: 0x0000011b, 0x00000709, 0x0000007c
Script xử lý các lỗi "Windows cannot connect to the printer" phổ biến khi kết nối máy in chia sẻ trong LAN — chạy trên máy chủ chia sẻ hoặc máy con.
# Sửa lỗi kết nối máy in chia sẻ — cần quyền Administrator # Nhấp đúp bản .cmd để chọn chế độ, hoặc chạy trực tiếp: # .\sua-loi-ket-noi-may-in-share-11b-709.ps1 -Role Client -Printer \\PC-KETOAN\Canon2900
Tool phân tích lỗi màn hình xanh (BSOD)
Liệt kê các lần màn hình xanh gần đây, mã lỗi (bugcheck), các lần tắt máy đột ngột, file minidump và gợi ý cách xử lý theo từng mã lỗi.
# Phân tích màn hình xanh (BSOD) — chạy với quyền Administrator để đọc đủ nhật ký
$tips = [ordered]@{
'0x000000ef' = 'CRITICAL_PROCESS_DIED — file hệ thống hỏng: chạy sfc /scannow và DISM /Online /Cleanup-Image /RestoreHealth'
Tool quét virus bằng Microsoft Defender (có menu)
Cập nhật mẫu virus, chọn quét nhanh / toàn bộ / USB / quét ngoại tuyến, rồi liệt kê mối đe doạ đã phát hiện — dùng Defender có sẵn trên Windows, miễn phí.
# Quét virus bằng Microsoft Defender — chạy với quyền Administrator
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('Administrators')) {
Start-Process powershell "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit
Kiểm tra bản quyền Windows & Office
Xem Windows, Office đã kích hoạt chưa, loại key (Retail/OEM/Volume), 5 ký tự cuối của key và ngày hết hạn — chỉ đọc thông tin, không thay đổi hệ thống.
# Kiểm tra trạng thái bản quyền Windows & Office — CHỈ ĐỌC, không thay đổi hệ thống
$statusText = @{ 0='Unlicensed (chưa có bản quyền)'; 1='Licensed (đã kích hoạt)'; 2='OOB Grace'; 3='OOT Grace';
4='Non-Genuine Grace'; 5='Notification (chưa kích hoạt)'; 6='Extended Grace' }
Bình luận (0)