從 Windows 裝置收集診斷

收集診斷遠端動作可讓您收集和下載 Windows 裝置記錄,而不會中斷使用者。 只會存取非使用者位置和檔案類型。

收集診斷遠端動作也可以設定為在裝置上發生 Autopilot 失敗時自動收集和上傳 Windows 裝置記錄。 發生 Autopilot 失敗時,記錄會在失敗的裝置上處理,然後自動擷取並上傳至 Intune。 裝置每天可以自動擷取一組記錄。

診斷集合會儲存 28 天,然後刪除。 每個裝置一次最多可以儲存10個集合。

收集診斷 也可作為 大量裝置動作 ,一次從最多 25 部 Windows 裝置收集診斷記錄。

注意事項

Microsoft 人員可以存取裝置診斷,以協助疑難解答和解決事件。

需求

下列項目支援 收集診斷 遠端動作:

  • Intune 或共同管理的裝置
  • Windows 10 1909 版和更新版本
  • Windows 11
  • Microsoft HoloLens 2 2004 和更新版本
  • 全域管理員、Intune 系統管理員,或在 [裝置合規性政策] 下) 和 [取 (] 下收集診斷 () 許可權的角色
  • 公司擁有的裝置
  • 在線且能夠在診斷期間與服務通訊的裝置

注意事項

若要讓診斷能夠從用戶端成功上傳,請確定網路上不會封鎖下列 URL: lgmsapeweu.blob.core.windows.netlgmsapewus2.blob.core.windows.netlgmsapesea.blob.core.windows.netlgmsapeaus.blob.core.windows.netlgmsapeind.blob.core.windows.net

收集診斷

若要使用 收集診斷 動作:

  1. 登入 Microsoft Intune 系統管理中心
  2. 流覽至 [ 裝置>][Windows> ] 選取支援的裝置。
  3. 在裝置的 [ 概觀 ] 頁面上,選取 [...]>收集診斷>。 裝置的 [ 概觀 ] 頁面上會出現擱置中的通知。
  4. 若要查看動作的狀態,請選取 [裝置診斷監視器]
  5. 動作完成之後,選取數據列中的 [下載] 作為動作 > [是]
  6. 數據 ZIP 檔案會新增至您的下載匣,您可以將它儲存到您的電腦。

Autopilot 失敗的診斷集合

針對 Autopilot 診斷集合,不需要採取任何其他動作。 只要已啟用 Autopilot 自動擷取診斷功能,當裝置發生失敗時,就會自動擷取 Autopilot 診斷。

若要檢視 Autopilot 失敗後收集的診斷:

  1. 登入 Microsoft Intune 系統管理中心
  2. 流覽至 [裝置>] [Windows]
  3. 選取裝置。
  4. > [診斷下載]
  5. 數據 ZIP 檔案會新增至您的下載匣,您可以將它儲存到您的電腦。

收集的資料

雖然沒有任何收集個人資料的意圖,但診斷可能包含用戶可識別的資訊,例如使用者或裝置名稱。

如果您已在 Windows 10 上安裝KB5011543,或在 Windows 11 上KB5011563,則 zip 檔案的格式會比較簡單,包括:

  • 扁平化結構,其中所收集的記錄會命名為符合收集的數據
  • 收集多個檔案時,會建立資料夾。

下列清單與診斷 zip 的順序相同。 每個集合都包含下列資料:

登入機碼:

  • HKLM\SOFTWARE\Microsoft\CloudManagedUpdate
  • HKLM\SOFTWARE\Microsoft\EPMAgent
  • HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\DeviceHealthMonitoring
  • HKLM\SOFTWARE\Microsoft\IntuneManagementExtension
  • HKLM\SOFTWARE\Microsoft\SystemCertificates\AuthRoot
  • HKLM\SOFTWARE\Microsoft\Windows 進階威脅防護
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM\SOFTWARE\Policies
  • HKLM\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL
  • HKLM\SOFTWARE\Policies\Microsoft\Windows Advanced Threat Protection
  • HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL
  • HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\Mdm
  • HKLM\SYSTEM\Setup\SetupDiag\Results

命令:

  • %programfiles%\windows defender\mpcmdrun.exe -GetFiles
  • %windir%\system32\certutil.exe -store
  • %windir%\system32\certutil.exe -store -user my
  • %windir%\system32\Dsregcmd.exe /status
  • %windir%\system32\ipconfig.exe /all
  • %windir%\system32\mdmdiagnosticstool.exe
  • %windir%\system32\msinfo32.exe /report %temp%\MDMDiagnostics\msinfo32.log
  • %windir%\system32\netsh.exe advfirewall show allprofiles
  • %windir%\system32\netsh.exe advfirewall show global
  • %windir%\system32\netsh.exe lan show 設定檔
  • %windir%\system32\netsh.exe winhttp show Proxy
  • %windir%\system32\netsh.exe wlan show 配置檔
  • %windir%\system32\netsh.exe wlan show wlanreport
  • %windir%\system32\ping.exe -n 50 localhost
  • %windir%\system32\pnputil.exe /enum-drivers
  • %windir%\system32\powercfg.exe /batteryreport /output %temp%\MDMDiagnostics\battery-report.html
  • %windir%\system32\powercfg.exe /energy /output %temp%\MDMDiagnostics\energy-report.html

事件檢視器:

  • 應用程式
  • Microsoft-Windows-AppLocker/EXE and DLL
  • Microsoft-Windows-AppLocker/MSI and Script
  • Microsoft-Windows-AppLocker/Packaged app-Deployment
  • Microsoft-Windows-AppLocker/Packaged app-Execution
  • Microsoft-Windows-AppxPackaging/Operational
  • Microsoft-Windows-Bitlocker/Bitlocker Management
  • Microsoft-Windows-HelloForBusiness/Operational
  • Microsoft-Windows-SENSE/Operational
  • Microsoft-Windows-SenseIR/Operational
  • 具有進階安全性/防火牆的 Microsoft-Windows-Windows 防火牆
  • Microsoft-Windows-WinRM/Operational
  • Microsoft-Windows-WMI-Activity/Operational
  • Microsoft-Windows-AppXDeployment/Operational
  • Microsoft-Windows-AppXDeploymentServer/Operational
  • 設定
  • 系統

檔案:

  • %ProgramData%\Microsoft\DiagnosticLogCSP\Collectors\*.etl
  • %ProgramFiles%\Microsoft EPM Agent\Logs\*.*
  • %ProgramData%\Microsoft\IntuneManagementExtension\Logs\*.*
  • %ProgramData%\Microsoft\Windows Defender\Support\MpSupportFiles.cab
  • %ProgramData%\Microsoft\Windows\WlanReport\wlan-report-latest.html
  • %ProgramData%\USOShared\logs\system\*.etl
  • %ProgramData Microsoft Update Health Tools\Logs\*.etl
  • %temp%\CloudDesktop*.log
  • %temp%\MDMDiagnostics\battery-report.html
  • %temp%\MDMDiagnostics\energy-report.html
  • %temp%\MDMDiagnostics\mdmlogs-Date</Time>.cab
  • %temp%\MDMDiagnostics\msinfo32.log
  • %windir%\ccm\logs\*.log
  • %windir%\ccmsetup\logs\*.log
  • %windir%\logs\CBS\cbs.log
  • %windir%\logs\measuredboot\*.*
  • %windir%\logs\Panther\unattendgc\setupact.log
  • %windir%\logs\SoftwareDistribution\ReportingEvent\measuredboot\*.log
  • %windir%\Logs\SetupDiag\SetupDiagResults.xml
  • %windir%\logs\WindowsUpdate\*.etl
  • %windir%\SensorFramework*.etl
  • %windir%\system32\config\systemprofile\AppData\Local\mdm\*.log
  • %windir%\temp%computername%*.log
  • %windir%\temp\officeclicktorun*.log
  • %TEMP%\winget\defaultstate*.log

停用裝置診斷

默認會啟用 收集診斷 遠程動作。 您可以遵循下列步驟,停用所有裝置 的收集診斷 遠端動作:

  1. 登入 Microsoft Intune 系統管理中心

  2. 流覽至 [租使用者管理>] [裝置診斷]

  3. 將 [裝置診斷] 底下的控件變更為 [公司管理的裝置],其執行 Windows 10 版本 1909 及更新版本,或 Windows 11。為 [已停用]

    顯示 [裝置診斷] 窗格的螢幕快照,其中已將裝置診斷的醒目提示控件設定為 [已停用]。

停用 Autopilot 自動收集診斷

默認會啟用 Autopilot 自動診斷擷取。 您可以依照下列步驟停用 Autopilot 自動診斷擷取:

  1. 登入 Microsoft Intune 系統管理中心

  2. 流覽至 [租使用者管理>] [裝置診斷]

  3. 在 Windows 10 1909 版或更新版本的 Autopilot 程式期間發生失敗且 Windows 11 時,變更 [自動擷取診斷] 底下的控件。診斷可能包含使用者標識資訊,例如使用者或裝置名稱 (預覽) 。[已停用]

    顯示 [裝置診斷] 窗格的螢幕快照,其中已將 Autopilot 自動診斷收集的醒目提示控件設定為 [已停用]。

裝置診斷的已知問題

目前有兩個主要問題可能會導致裝置診斷失敗:

  1. 裝置上可能會發生逾時,而沒有修補 程式KB4601315KB4601319。 這些修補程式包含 DiagnosticLog CSP 的修正,可防止在上傳期間逾時。 安裝更新之後,請務必重新啟動您的裝置。
  2. 裝置無法在24小時內收到裝置動作。 如果裝置離線或關閉,可能會導致失敗。