Share via


SMS_StatusMessage

The SMS_StatusMessage WMI class that represents individual status messages generated by the SMS server to provide information about a variety of events, including process completion, errors, conditions, and user actions. You can use the methods of this class to generate user-defined status messages.

The following syntax is simplified from MOF code and includes all inherited properties.

Class SMS_StatusMessage : SMS_BaseClass
{
  string Component;
  string MachineName;
  uint32 MessageID;
  uint32 MessageType;
  string ModuleName;
  uint32 PerClient;
  uint32 ProcessID;
  uint32 RecordID;
  uint32 ReportFunction;
  uint32 Severity;
  string SiteCode;
  uint32 SuccessfulTransaction;
  uint32 ThreadID;
  datetime Time;
  string TopLevelSiteCode;
  uint32 Transaction;
  uint32 Win32Error;
};

Properties

  • Component
    Data type: string
    Access type: Read-only

    Name of the component which created the message. For user-defined messages, this comes from the ApplicationName context qualifier that you must set before calling a raise status message method.

  • MachineName
    Data type: string
    Access type: Read-only

    Name of the computer that created the message. For user-defined messages, this comes from the MachineName context qualifier that you must set before calling a raise status message method.

  • MessageID
    Data type: uint32
    Access type: Read-only

    Uniquely identifies message text in a message DLL. This property is set to the associated value when you call a method listed in this table.

    Value Description
    39997 RaiseInformationalStatusMsg
    39998 RaiseWarningStatusMsg
    39999 RaiseErrorStatusMsg
  • MessageType
    Data type: uint32
    Access type: Read-only

    This property can contain the following values.

    Message type value Description
    256 Use the Milestone message type at the end of an operation to indicate the operation's success or failure. If the operation was successful, you would use the Milestone type in an informational message. If the operation failed, you would use a Milestone message type in a warning or error message.
    512 Use the Detail message type to illustrate the steps in a complex operation. Often, detail messages are meaningful only within the context of the sequence of status messages representing a complex operation.
    768 Use the audit message type for informational messages that provides a trail of actions taken by the SMS Administrator. An audit message also depicts an operation that results in objects being added, modified, or deleted. You need not create audit messages; the provider automatically generates these messages for you.
    1024 This value is not used.
  • ModuleName
    Data type: string
    Access type: Read-only

    DLL associated with the status message you wish to raise. This is not the name of the DLL itself, but a display string corresponding to the ModuleName property value defined in the SMS_StatMsgModuleNames class. You use the ModuleName value to get the DLL name.

  • PerClient
    Data type: uint32
    Access type: Read-only

    Indicates whether the status message was generated by a client component. Messages generated on a per-client basis tend to be quite numerous, so this property provides an easy way to filter them out.

    Value Description
    1 True
    0 False
  • ProcessID
    Data type: uint32
    Access type: Read-only

    Identifier of the process which created the message.

  • RecordID
    Data type: uint32
    Access type: Read-only
    Qualifiers: Key

    Unique identifier of this message instance.

  • ReportFunction
    Data type: uint32
    Access type: Read-only

    Reserved for internal use only.

  • Severity
    Data type: uint32
    Access type: Read-only

    Type of status message.

    Value Description
    0x40000000 Informational
    0x80000000 Warning
    0xC0000000 Error
  • SiteCode
    Data type: string
    Access type: Read-only

    Site which created the message.

  • SuccessfulTransaction
    Data type: uint32
    Access type: Read-only

    Reserved for internal use only.

  • ThreadID
    Data type: uint32
    Access type: Read-only

    Identifier of the thread which created the message.

  • Time
    Data type: datetimeAccess type: Read-only

    Date and time (Greenwich mean time) when the status message was created.

  • TopLevelSiteCode
    Data type: string
    Access type: Read-only

    Top site to which message can be replicated.

  • Transaction
    Data type: uint32
    Access type: Read-only

    Reserved for internal use only.

  • Win32Error
    Data type: uint32
    Access type: Read-only

    Win32 error code associated with the status message.

Methods

The following table lists the methods in SMS_StatusMessage.

Method Description
DeleteByID Class method that deletes a group of up to 256 status messages specified by an array of RecordID values.
DeleteByQuery Class method that deletes a group of status messages specified by a Windows Management Instrumentation (WMI) Query Language (WQL) SELECT statement.
RaiseErrorStatusMsg Class method that creates an error status message.
RaiseInformationalStatusMsg Class method that creates an informational status message.
RaiseRawStatusMsg Class method that creates a status message from an external message DLL.
RaiseWarningStatusMsg Class method that creates a warning status message.

See Also

SMS_StatMsgAttributes, SMS_StatMsgInsStrings, SMS_StatMsgModuleNames, Status Classes, Using Status Messages