What is the MOF file format?
.mof files are associated with the Distributed Management Task Force (DMTF) and are used on Windows platforms as part of the WMI subsystem.
.mof files store data in plain text using ASCII or Unicode encoding. A Unicode .mof opens with a byte-order mark (FF FE for UTF-16 LE, or FE FF for big-endian). .mof files contain class and instance declarations written in Managed Object Format language - the textual syntax of DMTF's Common Information Model (CIM). .mof files are used for managing WMI settings and resources.
A .mof file is *source code*, not live repository data. To take effect, it must be compiled by mofcomp.exe (found in %Windir%\System32\wbem), which parses the declarations and writes them into the WMI repository. Editing the .mof text does not change WMI until the file is recompiled.
What is WMI?
WMI (short for Windows Management Instrumentation) is a set of protocols for system resource data interchange and communication. WMI allows users to manage many system components such as NICs, control system processes, read system sensor data, and more. .mof files store instructions and structures - such as class definitions with typed properties and qualifiers - that define process communication and data exchange in Microsoft Windows systems.
Related configuration formats include .reg files (Windows Registry exports) and .ps1 scripts (PowerShell), both of which can also interact with WMI and system resources.
Security & safety
RISK: MEDIUMA MOF is plain text, so reading one is safe. The caution is in compiling it: 'mofcomp file.mof' modifies the WMI repository with administrator rights, and a malicious or buggy MOF could add classes, register a WMI event-consumer for persistence (a known attacker technique), or corrupt parts of the repository. Only compile MOF files from trusted sources, review the contents first, and prefer 'mofcomp -check' to validate before committing on production systems.
Format details
in a nutshellPrograms that open MOF files
Technical details
deep spec| Format type | Plain-text source file declaring CIM/WMI classes and instances (compiled by mofcomp, not interpreted directly) |
| Syntax language | Managed Object Format (MOF) - C-like declarative syntax defined by DMTF DSP0004/DSP0221 |
| Encoding | ASCII or UTF-16; a Unicode .mof opens with a byte-order mark (FF FE for UTF-16 LE, FE FF for BE) |
| File signature | No fixed magic bytes; ASCII .mof files carry none; Unicode .mof is identified by its BOM only |
| Compiler tool | mofcomp.exe in %Windir%\System32\wbem - parses .mof source and writes classes/instances into the WMI repository |
| MIME type | text/plain |
| Namespace targeting | #pragma namespace directive at file top sets the WMI target namespace (e.g. root\cimv2) |
| Class syntax | class ClassName : ParentClass { ... } with strongly-typed properties and optional bracket qualifiers |
| Instance syntax | instance of ClassName { ... } blocks define WMI object instances inline in the source |
| Qualifiers | Square-bracket annotations such as [Dynamic, Provider("WMIProv"), read] decorate classes and properties |
| Pragma directives | #pragma autorecover, #pragma deleteclass and #pragma deleteinstance control compilation behavior |
| WMI repository path | Compiled output stored in %Windir%\System32\wbem\Repository |
| Typical file size | 1 KB - several hundred KB; large schema files such as the WMI core MOF can reach multiple megabytes |
| Localization partner | .mfl (MOF localization file) pairs with .mof to supply locale-specific string resources for WMI classes |
| Released | Mid-1990s - MOF is the textual syntax of DMTF's Common Information Model (CIM); adopted by Microsoft WMI in Windows (since ~1998) |
| Latest version | Defined by the DMTF CIM/MOF specification (DSP0221); evolves with the CIM Infrastructure standard |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
MOF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MOF files.