🧾 Tool Tiện ích Windows

Script kiểm tra nhanh thông tin máy tính (PowerShell)

Xuất tên máy, hệ điều hành, CPU, RAM, ổ cứng, IP, MAC và số Serial chỉ với một lệnh — tiện cho kiểm kê tài sản IT.

⬇ Tải file tool
CMD
Bản chạy 1 click (khuyên dùng) script-kiem-tra-thong-tin-may-tinh.cmd 1.5 KB v1.2 Cập nhật 22/10/2026 ⬇ 347
Cách chạy
  1. Nhấp đúp file script-kiem-tra-thong-tin-may-tinh.cmd.
  2. Nếu hiện Windows protected your PC: bấm More info → Run anyway (file tải từ Internet).
  3. Dùng bản .ps1? Máy đặt ExecutionPolicy AllSigned/Restricted sẽ chặn (mở lên rồi tắt). Chạy bằng lệnh: powershell -ExecutionPolicy Bypass -File .\script-kiem-tra-thong-tin-may-tinh.ps1

⚠ Đọc kỹ nội dung script trước khi chạy — nội dung đầy đủ ở khung bên dưới.

Mã nguồn / Script powershell
$cs   = Get-CimInstance Win32_ComputerSystem
$os   = Get-CimInstance Win32_OperatingSystem
$cpu  = Get-CimInstance Win32_Processor | Select-Object -First 1
$bios = Get-CimInstance Win32_BIOS
$net  = Get-NetIPConfiguration | Where-Object { $_.IPv4DefaultGateway }

$info = [ordered]@{
    "Tên máy"     = $env:COMPUTERNAME
    "Người dùng"  = $env:USERNAME
    "Hãng/Model"  = "$($cs.Manufacturer) $($cs.Model)"
    "Serial"      = $bios.SerialNumber
    "Hệ điều hành"= "$($os.Caption) ($($os.OSArchitecture)) build $($os.BuildNumber)"
    "CPU"         = $cpu.Name
    "RAM (GB)"    = [math]::Round($cs.TotalPhysicalMemory / 1GB, 1)
    "IP"          = ($net.IPv4Address.IPAddress -join ", ")
    "MAC"         = ($net | ForEach-Object { (Get-NetAdapter -InterfaceIndex $_.InterfaceIndex).MacAddress }) -join ", "
    "Gateway"     = ($net.IPv4DefaultGateway.NextHop -join ", ")
    "DNS"         = (($net.DNSServer | Where-Object AddressFamily -eq 2).ServerAddresses -join ", ")
}

Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | ForEach-Object {
    $info["Ổ $($_.DeviceID)"] = "{0:N1} GB trống / {1:N1} GB" -f ($_.FreeSpace/1GB), ($_.Size/1GB)
}

$out = $info.GetEnumerator() | ForEach-Object { "{0,-14}: {1}" -f $_.Key, $_.Value }
$out | Write-Host
$file = Join-Path ([Environment]::GetFolderPath("Desktop")) "ThongTinMay_$env:COMPUTERNAME.txt"
$out | Out-File $file -Encoding utf8
Write-Host "`nĐã lưu: $file" -ForegroundColor Green

Tính năng

  • Lấy thông tin phần cứng: CPU, RAM, ổ đĩa, Serial (BIOS)
  • Lấy thông tin mạng: IP, MAC, Gateway, DNS
  • Xuất ra màn hình và lưu file .txt trên Desktop

Cách dùng

  1. Copy đoạn script bên dưới, lưu thành ThongTinMay.ps1
  2. Chuột phải → Run with PowerShell
  3. Nếu bị chặn, chạy trước lệnh: Set-ExecutionPolicy -Scope Process Bypass

Mẹo: chạy qua GPO/Intune để gom thông tin toàn bộ máy trong công ty.

Bình luận (1)

Bạn có thể tự xoá bình luận của mình trên trình duyệt này.
M
Minh IT 10 ngày trước
Script rất tiện, mình đã dùng để kiểm kê 50 máy trong công ty. Cảm ơn admin!

Bài liên quan

💙 Tool Tiện ích Windows

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.

tool-phan-tich-loi-man-hinh-xanh-bsod.ps1
# 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'
👁 725 ⬇ 277 ⬇ Chi tiết →
🔑 Tool Tiện ích Windows

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.

kiem-tra-ban-quyen-windows-office.ps1
# 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' }
👁 647 ⬇ 242 ⬇ Chi tiết →
🖨️ Tool Công cụ mạng

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.

sua-loi-ket-noi-may-in-share-11b-709.ps1
# 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
👁 1.4K ⬇ 621 ⬇ Chi tiết →
🦠 Tool Bảo mật & Diệt virus

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í.

tool-quet-virus-microsoft-defender.ps1
# 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
👁 918 ⬇ 386 ⬇ Chi tiết →