Code Monkey home page Code Monkey logo

format-intunediagdata's Introduction

Format-IntuneDiagData.ps1

Format-IntuneDiagData.ps1 (FIDD) is a stand-alone script to organize data collected by the Intune collect diagnostics device action.

This script will organize the collected data in to a logical folder structure and renames the files to reflect their contents.

FIDD output

Usage

Use these steps to run this utility:

  1. Create a temporary folder, download Format-IntuneDiagData.ps1 from this repo and save the file to this folder.
  2. Download the device diagnostics data from the MEM portal (Home > Devices > All devices > <DeviceName> > Device diagnostics > Download). Place the file in the same folder as Format-IntuneDiagData.ps1.
  3. Open a PowerShell window and run .\Format-IntuneDiagData.ps1. If you launch the script from the folder where the zip file is located, no additional parameters are required. Otherwise, specify the location of the zip file using the -ArchiveName command-line switch.
    Example:
     .\Format-IntuneDiagData.ps1 -ArchiveName c:\temp\DiagLogs-Computer01-20210029T175224Z.zip
    
  4. The script will copy data and rename files as appropriate. Embedded CAB files (mpsupportfiles.cab and mdmlogs*.cab) will be extracted to a subfolder. When the script completes, it will launch Windows Explorer in the folder where the extracted data has been copied.

Known issues and planned improvements

  • Multiple copies of files may exist (for example, Event Viewer logs and registry keys). A future improvement will consolidate the files to a single location.
  • Some third-party file archiving tools may report "Headers Error:" and the name of the file when extracting data from Diaglogs*.zip. To work around this limitation, open the zip using Windows Explorer or use the Expand-Archive cmdlet.
  • Commands collected on localized devices (i.e. non-English-language Windows devices) may not correctly parse some commands. Look in the metadata folder for Unknown_Command_Result_* files.

FAQ

Q: What is the aim of this tool?

A: The Intune collect diagnostics feature provides admins a simple way to collect data without having to log on to managed Windows devices. This tool aims to allow admins to quickly locate the data they are looking for.

Q: Where is the data stored?

A: Files are extracted to the current folder by default in a subfolder named IntuneDeviceData.

Q: I'd like to add additional files to the collected data. Where can I suggest changes to this feature?

A: The best way to make this kind of request is through your Microsoft account team. They can assist you with filing a design change request.

Q: When should I use 'collect diagnostics' and when should I use Intune One Data Collector (ODC)?

A: 'Collect diagnostics' is a great tool for gathering data from a remote computer without needing to either log on to a Windows device interactively or to interrupt your users. As such, this tool has many advantages for admins in their daily work.

ODC collects data for more specialized troubleshooting. A lot of data gathered by this tool is aimed at very specific scenarios that require deep knowledge of the various OS components that Intune manages. ODC is XML-driven, which also allows us to very quickly add new data collection rules. As such, this tool is most useful to Microsoft Support engineers (but anyone who finds it useful is more than welcome to it :) ).

Q: How can I tell the difference between a zip file generated by 'collect diagnostics' and a zip file created by running ODC?

A: ODC log archives will be named in the format <DeviceName>_CollecteData.zip and 'collect diagnostics' archives will be named DiagLogs-<DeviceName>-<TimeStamp>.zip by default.

Q: What are the files in the metadata folder?

A: Metadata contains output that the script is either unable to detect the contents of (zero-byte files, command line stdout output, etc.). If you cannot find output that you expect, look here in the Unknown_Command_Result_* files.

Future improvements

Planned future additions to FIDD. Please feel free to suggest (or contribute!) additional functionality and features. I'd love to hear how you use FIDD and what I can do to make your job easier!

Shell integration

Right-click menu action in Explorer to open the zip file with FIDD. 1) Option to unzip and 2) Option to unzip and open a PowerShell window in the working directory.

Add PowerShell profile options to include functions to run FIDD from the command line without needing to know the entire path. Cleanup and processing options for data.

Change Log

1.4.2022

  • Prevent accidental registry import by renaming all .reg files to .txt extension

  • Bugfix for devices early in AP setup with only cab information

  • Add debug log

Copyright

Copyright (c) 2017 Microsoft. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

format-intunediagdata's People

Contributors

markstan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.