The #pragma preprocessor command is similar to a command-line switch. However, you do not need to reenter a #pragma command each time you compile a MOF file. The following example illustrates #pragma command syntax:
#pragma [command]
You usually place a #pragma command at the beginning of a MOF file. However, you can place some commands, such as the #pragma command, in the body of your MOF code. The following example shows #pragma commands that indicate to the MOF compiler that it must place classes and instances in the root\cimv2 namespace and compile the file in which the commands are included during repository recovery:
This module explains the structure of the namespaces that contain classes and also how to query instances of a class. It covers how to query remote computers by using ad-hoc connections and CIM sessions.