01 · Lý thuyết
Các loại ứng dụng trong Intune
| Loại ứng dụng | Format | Use case | Ưu điểm | Hạn chế |
|---|---|---|---|---|
| Win32 app | .intunewin | Phần mềm doanh nghiệp phức tạp | Hỗ trợ detection rules, dependencies, supersedence | Cần đóng gói bằng IntuneWinAppUtil |
| Line-of-business (LOB) | .msi, .appx, .ipa, .apk | App nội bộ doanh nghiệp | Upload trực tiếp, đơn giản | Ít tùy chọn cấu hình hơn Win32 |
| Microsoft Store (new) | WinGet package | App từ Microsoft Store | Auto-update, không cần upload | Chỉ app có trên Store |
| Web link | URL | Web app / SaaS | Không cần file, nhanh | Chỉ là shortcut, không install |
| Microsoft 365 Apps | ODT | Word, Excel, Teams, OneDrive | Tích hợp sâu, update tự động | Chỉ dành cho M365 apps |
| Managed Google Play | Android APK | App cho Android Enterprise | Quản lý qua Play Store | Cần Android Enterprise setup |
Win32 App – Chi tiết quy trình
Win32 là loại app phổ biến và mạnh nhất trong Intune. Quy trình gồm 3 bước chính:
Đóng gói
Dùng IntuneWinAppUtil.exe để nén installer thành file .intunewin
Upload & Cấu hình
Upload .intunewin lên Intune, cấu hình install/uninstall command, detection rules
Assign & Monitor
Assign cho group với intent Required/Available, theo dõi installation status
Assignment Intent – Required vs Available vs Uninstall
| Intent | Hành vi | User có thể từ chối? | Use case |
|---|---|---|---|
| Required | Tự động cài đặt, không hỏi user | Không | Security agents, mandatory tools |
| Available | Hiện trong Company Portal, user tự cài | Có (user chọn) | Optional apps, productivity tools |
| Available without enrollment | Available cho MAM-WE devices | Có | BYOD, web apps |
| Uninstall | Gỡ cài đặt tự động | Không | Remove legacy apps, cleanup |
Detection Rules – Xác định app đã cài hay chưa
| Loại rule | Cách hoạt động | Ví dụ |
|---|---|---|
| MSI product code | Kiểm tra GUID trong registry | {7D5F1B3A-...} |
| File/Folder | Kiểm tra file/folder tồn tại, version, size | C:\Program Files\App\app.exe version ≥ 3.0 |
| Registry | Kiểm tra registry key/value | HKLM\Software\App\Installed = 1 |
| Custom script | PowerShell script trả về exit code | Script kiểm tra service running |
Dependencies và Supersedence
- Dependencies: App A yêu cầu App B phải cài trước. Intune tự động cài App B trước khi cài App A. Ví dụ: .NET Runtime là dependency của nhiều ứng dụng doanh nghiệp.
- Supersedence: App mới thay thế App cũ. Intune tự gỡ phiên bản cũ và cài phiên bản mới. Ví dụ: Adobe Reader 2024 supersede Adobe Reader 2023.
02 · Thực hành
Lab A: Đóng gói Win32 App bằng IntuneWinAppUtil
Lab B: Upload Win32 App lên Intune Portal
Thực hành tại: intune.microsoft.com → Apps → Windows → Add
- Vào intune.microsoft.com → Apps → Windows → Add
- App type: chọn Windows app (Win32) → Select
- Tab App information:
• Select app package file: upload7z2301-x64.intunewin
• Name: 7-Zip 23.01
• Description: Free open-source file archiver
• Publisher: Igor Pavlov
• Install behavior: System (cài cho toàn máy) - Tab Program:
• Install command:7z2301-x64.exe /S
• Uninstall command:MsiExec.exe /X{23170F69-40C1-2702-2301-000001000000} /qn
• Return codes: 0 = Success, 3010 = Reboot required - Tab Requirements:
• OS Architecture: x64
• Minimum OS: Windows 10 21H2 - Tab Detection rules:
• Rule type: File
• Path:C:\Program Files\7-Zip
• File:7z.exe
• Detection method: File or folder exists - Tab Assignments:
• Required: All Devices (bắt buộc cài)
• Available: GRP-IT-Admins (tùy chọn qua Company Portal) - Review + Create → Create
Lab C: Deploy Win32 App qua Graph PowerShell
Lab D: Thêm Dependency (.NET Runtime)
Lab E: Xử lý lỗi cài đặt phổ biến
03 · Tình huống thực tế
Công ty CP Phần mềm VietTech – Chuẩn hoá 300 máy tính
VietTech vừa mua thêm 300 laptop mới cho đội kỹ thuật. Mỗi máy cần có sẵn: Visual Studio Code, Git for Windows, Python 3.12, DBeaver, VPN Client, và .NET 8 Runtime. Trước đây IT phải cài tay từng máy mất 3–4 ngày.
Giải pháp Intune Win32 Deployment:
- ✓ Đóng gói tất cả 6 ứng dụng thành .intunewin bằng IntuneWinAppUtil
- ✓ Cấu hình .NET 8 Runtime là dependency của Visual Studio Code
- ✓ Set intent = Required cho tất cả → tự động cài ngay khi máy enroll vào Intune
- ✓ Assign cho group GRP-Dev-New-Machines
- ✓ Máy mới chỉ cần: bật nguồn → đăng nhập M365 account → 30–45 phút tự cài hết
Kết quả:
- • Giảm từ 3–4 ngày xuống còn 0 giờ IT can thiệp cho mỗi máy
- • 100% máy đồng nhất cấu hình — không còn "máy tôi không có X"
- • Dễ dàng update: khi Python 3.13 ra, chỉ cần upload version mới và set Supersedence