// This schema is intended to be introduced into any namespace // in which aliases will be defined. #pragma Namespace("\\\\.\\root") instance of __Namespace { Name = "Cli"; }; #pragma Namespace("\\\\.\\root\\cli") [Description( "Instances of the CliQualifier class represent qualifiers that influence " "the handling of the associatied object. These qualifiers are drawn from the " "qualifiers on the underlying WMI object and should be handled the same way. " "For example ValueMap should be treated as a constraint on the values that " "may used with the Set verb on a property. The MaxLen qualifier should be " "treated as a constraint on the number of characters that can be provided " "on a Set.")] class MSFT_CliQualifier { [Description( "The name of the qualifier - this must be unique within the set " "of qualifiers for the object the qualifier applies to")] STRING Name; [Description( "The value for the qualifier. Note that the WMI convention " "will be strictly followed and qualifiers present without a value will not " "have any entries in this property. For example the Write qualifier is commonly " "used without a value and the presence of the qualifier is taken as indicating " "that the property is writable - its value is irrelevant.")] STRING QualifierValue[]; }; [Description( "Instances of the CliParam class define verb parameters. Each verb " "has a (possibly empty) list of parameters accepted by the verb. The CliParam " "instance defines the name of the paramater, the default value for the parameter, " "the type of the parameter and whetehr the parameter is optional or not.")] class MSFT_CliParam { [Description( "The default string defines the default value used for the parameter " "if the user choose not to supply any actual value.")] STRING Default; [Description( "The Description property provides description of the parameter")] String Description; [Description( "The Optional boolean indicates that the parameter may be omotted.")] BOOLEAN Optional; [Description( "The ParaId string is the formal name for the parameter.")] STRING ParaId; [Description( "The qualifiers applicable to this Parameter")] MSFT_CliQualifier Qualifiers[]; [Description( "The Type string defines the format expected for any value supplied " "for this parameter.")] STRING Type; }; [Description( "Instances of the CliVerb class represent behavior available through " "the alias. The Name property defines the actual function to be invoked when " "the verb is used in a command. The function may be either a fiixed list of " "system defined standard functions such as CALL. Or the function may be a " "method by on the Target of the alias. The verb has both a Descriptions property " "providing a description of what the verb does and a Usages property providing " "a description of how the verb should be called.")] class MSFT_CliVerb { [Description( "The Derivation string represents the name of the method the verb " "is based on or the name of a standard verb (for example the standard verb " "'CALL').")] STRING Derivation; [Description( "The Description property provides the description of the verb")] String Description; [Description( "The Name string provides the name for the verb.")] STRING Name; [Description( "The Parameters array provides an array of objects that describe " "the parameters accepted by the verb.")] MSFT_CliParam Parameters[]; [Description( "The qualifiers applicable to this Verb")] MSFT_CliQualifier Qualifiers[]; [Description( "The VerbType property identifies the type of " "the verb. If the VerbType property has the value 2 " "(CommandLine), the verb is executed by invocation of the " "command line utility named in the Derivation property. If " "no Parameters are provided as a part of the verb " "definition, at invocation time the text up to the next " "carriage return should be passed to the utility named in " "the Derivation property. If any Parameters are provided " "as a part of the verb definition - the parameter " "definitions should be used in checking actual parameters " "provided at invocation time."), Values{"Class Method", "Standard", "CommandLine"}] uint32 VerbType; [Description( "The Usages array provides the text that defines " "how the verb should be used.")] String Usage; }; [Description( "Instances of the CliProperty class describe values that will be " "used in a Format. Each property has a name, description " "and a Derivation. Note any formatting strategies such as truncation length " "or formatting strategies for numeric values will be defined in the stylesheet " "defined for the format containing the property.")] class MSFT_CliProperty { [Description( "The Derivation string provides an expression that will be used " "by the commandline utility to derive the value for the property. The derivation " "must be either the name of a property defined by the Alias' WMIObject or " "a Command Line command such as 'w System Get Name'.")] STRING Derivation; [Description( "The Description property provides a description of the property")] String Description; [Description( "The Name string provides the name of the property to be displayed.")] STRING Name; [Description( "The qualifiers applicable to this Property")] MSFT_CliQualifier Qualifiers[]; }; [Description( "Instances of the CliFormat class represent a display strategy for " "the alias. The display strategy consists of a list of properties to be displayed " "together with aformat (represented by an XSL style sheet) to be used indisplaying " "them")] class MSFT_CliFormat { [Description( "The Format string provides the location of an XSL file that can " "be used to format the output from the category.")] STRING Format; [Description( "The Name string corresponds to the format used with the SHOW command. " "The format name may be one of the system defined formats(FULL, BRIEF, INSTANCE) " "or may be an arbitrary user-defined format.")] STRING Name; [Description( "The Properties arrays is the list of properties to be shown for " "this Format.")] MSFT_CliProperty Properties[]; }; [Description( "The CliConnection class defines parameters to be used with the owning " "alias when establishing the connection to the namespace on which the Alias " "will operate. If one of the connection properties is not specified it should " "default to the current value for that property for the utility session.")] class MSFT_CliConnection { [Description( "Optional. If the strAuthority parameter begins with the string " "'kerberos:', Kerberos authentication is used and this parameter should contain " "a Kerberos principal name. If the strAuthority parameter contains any other " "value, NTLM authentication is used and this parameter should contain an NTLM " "domain name. If you leave this parameter blank the operating system negotiates " "with DCOM to determine whether NTLM or Kerberos authentication is used. This " "parameter should only be used with connections to remote WMI servers. If " "you attempt to set the authority for a local WMI connection, the connection " "attempt fails. For more information see Using Kerberos or NTLM Authentication " "with the Scripting API in the WMI SDK help file for more information. ")] STRING Authority; [Description( "Optional. String that specifies the localization code. If you want " "to use the current locale, leave it blank. If not blank, this parameter must " "be a string that indicates the desired locale in which information should " "be retrieved. For Microsoft locale identifiers, the format of the string " "is 'MS_xxxx', where xxxx is a string in hexadecimal form that indicates the " "LCID. For example, American English would appear as 'MS_409'")] STRING Locale; [Description( "Optional. String that specifies the namespace to which you log " "on. For example, to log on to the root\\default namespace, use 'root\\default'. " "If you do not specify this parameter, it defaults to the namespace that has " "been configured as the default namespace for scripting. For more information " "on the default value for this parameter, see WMI SDK help entries on Object " "Creation and Monikers.")] STRING NameSpace; [Description( "Optional. String that specifies the password to use when attempting " "to connect. Leave it blank to use the password of the current logged-on user. " "The Password parameter should only be used with connections to remote WMI " "servers. If you attempt to specify Password for a local WMI connection, the " "connection attempt fails. ")] STRING Password; [Description( "Optional. For access to a remote computer using DCOM, this parameter " "specifies the computer name. One example is 'myserver'. If you do not provide " "this parameter, the call defaults to the local computer.")] STRING Server; [Description( "Optional. String that specifies the user name to use while attempting " "to connect. This can be in the form of a user name or Domain\\Username. Leave " "it blank to use the current logged-on user name. The strUser parameter should " "only be used with connections to remote WMI servers. If you attempt to specify " "strUser for a local WMI connection, the connection attempt fails.")] STRING User; }; [Description( "Instances of the CliAlias class represent aliases. These are used " "by the WMI command utility as a mechanism for restructuring the capabilities " "provided by the WMI schema. The restructuring is done by roles. The roles " "are represented by namespaces. CliAlias instances are organized into role " "oriented namespaces in such a way that the aliases required by a specific " "operational role will all be found together. For example all the printer " "management aliases will be found in the \\\\.\\root\\ops\\printer namespace. " "Each alias consists of a list of Formats and verbs. The formats provide various " "display strategies for the Alias (for example FULL or BRIEF). The verbs represent " "behavior that is available through the Alias (for example RESET in the context " "of a printer). Each format consists of a list of properties. The Alias itself " "is related to the schema through the Target property that contains a WQL " "query or a valid path (which may be just a class name) that defines the instance " "or set of instances the alias applies to. ")] class MSFT_CliAlias { [Description( "The Connection object defines parameters required when connecting " "to WMI")] MSFT_CliConnection Connection; [Description( "The Description property provides a description of the alias")] String Description; [Description( "The elements of the Formats array define lists of properties to " "be shown for this alias. This is a list of lists indexed by the format name " "(for example FULL, BRIEF, INSTANCE or a user defined qualifier).")] MSFT_CliFormat Formats[]; [Description( "The FriendlyName string provides the name for the alias. The name " "will be unique in the context of the namespace in which the alias is defined. " "Note CLASS, QUERY, PATH and RESTORE cannot be used as alias names as they " "appear in the same location in the syntax."), key: DisableOverride ToInstance ToSubclass] STRING FriendlyName; [Description( "The PWhere property defines a from/where clause (i.e. a WQL query " "without the Select clause). The query string may contain substitution parameters " "(tokens preceded by a '#' mark) indicating where values may be substituted " "into the query string. The parameter values are taken from the tokens immediately " "after the alias if the token cannot be resolved to a switch or verb - this " "allows for example a command such as 'w KillProcess 154' where the PWhere " "value for the KillProcess alias would be 'From Win32_process Where ProcessId " "= #ProcId'")] STRING PWhere; [Description( "The qualifiers applicable to this Alias")] MSFT_CliQualifier Qualifiers[]; [Description( "The Target string defines the object to be operated on through " "the Alias. The string may be a simple class name or a WQL query. If the " "Target property is empty only verbs based on commandline utilities " "may be used by the alias")] STRING Target; [Description( "The Verbs array is the list of verbs supported for this alias.")] MSFT_CliVerb Verbs[]; }; [association, Description( "The CliSeeAlso association provides a relationship " "between an alias and related aliases that may be used as a part of the same " "role.")] class MSFT_CliSeeAlso { [Description( "The Descriptions property provides a description of how the See" "AlsoAlias relates to the original")] String Description; [key] MSFT_CliAlias ref Original; [key] MSFT_CliAlias ref Related; }; [Abstract, Description("A translatetable entry defines a mapping between " "one value or set of values and another value.")] class MSFT_CliTranslateTableEntry { [Description("The FromValue property defines a value or set of values that is " "to be translated. If the value is a set the syntax - should be " "used. This will be interpreted as meaning any value in collating sequence order " "between and including value1 and value2. If the character \"-\" is to be " "included it should be escaped with a \\ character")] string FromValue; [Description("The ToValue property defines the value to be substituted for the " "value recognised by the FromValue property.")] string ToValue; }; class MSFT_CliTranslateTable { [key, Description("The Name property provides a unique identifier for the table. " "This identifier may be referenced in the Translate switch.")] string Name; [Description("The Tbl property provides an array of translate table entries that " "define the translations to be performed for this translate table.")] MSFT_CliTranslateTableEntry Tbl[]; };