mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
458 lines
16 KiB
458 lines
16 KiB
// classes for WMI extensions to Group Policy
|
|
|
|
#pragma autorecover
|
|
#pragma namespace("\\\\.\\Root")
|
|
#pragma classflags ("forceupdate")
|
|
|
|
Qualifier Description : ToSubClass Amended;
|
|
|
|
Instance of __Namespace
|
|
{
|
|
Name = "Policy";
|
|
};
|
|
|
|
#pragma namespace("\\\\.\\Root\\Policy")
|
|
|
|
Instance of __Namespace
|
|
{
|
|
Name = "History";
|
|
};
|
|
|
|
|
|
Instance of __Win32Provider as $PolicRange
|
|
{
|
|
Name = "PolicRange";
|
|
ClsId = "{AAEAE72C-0328-4763-8ECB-23422EDE2DB5}";
|
|
ImpersonationLevel = 1;
|
|
PerUserInitialization = "FALSE";
|
|
HostingModel = "WmiCore";
|
|
};
|
|
|
|
Instance of __MethodProviderRegistration
|
|
{
|
|
Provider = $PolicRange;
|
|
};
|
|
|
|
Instance of __Win32Provider as $PolicTempl
|
|
{
|
|
Name = "PolicTempl";
|
|
ClsId = "{AAEAE72D-0328-4763-8ECB-23422EDE2DB5}";
|
|
ImpersonationLevel = 1;
|
|
PerUserInitialization = "FALSE";
|
|
HostingModel = "WmiCore";
|
|
};
|
|
|
|
Instance of __InstanceProviderRegistration
|
|
{
|
|
Provider = $PolicTempl;
|
|
SupportsGet = "TRUE";
|
|
SupportsPut = "TRUE";
|
|
SupportsDelete = "TRUE";
|
|
QuerySupportLevels = {"WQL:UnarySelect"};
|
|
};
|
|
|
|
Instance of __MethodProviderRegistration
|
|
{
|
|
Provider = $PolicTempl;
|
|
};
|
|
|
|
Instance of __Win32Provider as $PolicSOM
|
|
{
|
|
Name = "PolicSOM";
|
|
ClsId = "{AAEAE72F-0328-4763-8ECB-23422EDE2DB5}";
|
|
ImpersonationLevel = 1;
|
|
PerUserInitialization = "FALSE";
|
|
HostingModel = "WmiCore";
|
|
};
|
|
|
|
Instance of __InstanceProviderRegistration
|
|
{
|
|
Provider = $PolicSOM;
|
|
SupportsGet = "TRUE";
|
|
SupportsPut = "TRUE";
|
|
SupportsDelete = "TRUE";
|
|
QuerySupportLevels = {"WQL:UnarySelect"};
|
|
};
|
|
|
|
Instance of __MethodProviderRegistration
|
|
{
|
|
Provider = $PolicSOM;
|
|
};
|
|
|
|
Instance of __Win32Provider as $PolicType
|
|
{
|
|
Name = "PolicType";
|
|
ClsId = "{AAEAE72E-0328-4763-8ECB-23422EDE2DB5}";
|
|
ImpersonationLevel = 1;
|
|
PerUserInitialization = "FALSE";
|
|
HostingModel = "WmiCore";
|
|
};
|
|
|
|
Instance of __InstanceProviderRegistration
|
|
{
|
|
Provider = $PolicType;
|
|
SupportsGet = "TRUE";
|
|
SupportsPut = "TRUE";
|
|
SupportsDelete = "TRUE";
|
|
QuerySupportLevels = {"WQL:UnarySelect"};
|
|
};
|
|
|
|
Instance of __MethodProviderRegistration
|
|
{
|
|
Provider = $PolicType;
|
|
};
|
|
|
|
Instance of __Win32Provider as $PolicGpo
|
|
{
|
|
Name = "PolicGpo";
|
|
ClsId = "{AAEAE72B-0328-4763-8ECB-23422EDE2DB5}";
|
|
ImpersonationLevel = 1;
|
|
PerUserInitialization = "FALSE";
|
|
HostingModel = "WmiCore";
|
|
};
|
|
|
|
Instance of __InstanceProviderRegistration
|
|
{
|
|
Provider = $PolicGpo;
|
|
SupportsGet = "TRUE";
|
|
SupportsPut = "TRUE";
|
|
SupportsDelete = "TRUE";
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{63E29F85-6AF4-492e-A605-90E590F3FBA7}"),
|
|
Description("range param class is the basis of the PolicyTemplate "
|
|
"it describes one mergeable property of the target instance"), Provider("PolicRange")]
|
|
class MSFT_RangeParam
|
|
{
|
|
[write, NOT_NULL, Description("Name of property to be created")]
|
|
string PropertyName;
|
|
|
|
[write, Description("CIM Type of property, if Cim_Object then TargetClass gives user defined class")]
|
|
uint8 TargetType;
|
|
|
|
[write, Description("If TargetType is Cim_Object, then this contains class name")]
|
|
string TargetClass;
|
|
|
|
[Implemented, Static, Description("merges ranges into a single object")]
|
|
sint32 Merge ([in] MSFT_RangeParam ranges[], [out] MSFT_RangeParam mergedRange, [out] sint32 conflict);
|
|
|
|
[Implemented, Static, Description("Places property into the object being created by the PolicyTemplate")]
|
|
sint32 Resolve ([in] MSFT_RangeParam mergedRange, [in, out] object obj);
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{36E79DE7-9CEA-4cb7-9F65-12A95B6280EC}"),
|
|
Description("Defines a default and acceptable range for a signed integer property")]
|
|
class MSFT_SintRangeParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
sint32 Default;
|
|
|
|
[write, Description("Smallest allowable value for the corresponding target instance property")]
|
|
sint32 Min;
|
|
|
|
[write, Description("Largest allowable value for the corresponding target instance property")]
|
|
sint32 Max;
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{DB3F40A1-F91D-4de4-BDCE-C6F315A867DF}"),
|
|
Description("Defines a default and acceptable range for an unsigned integer property")]
|
|
class MSFT_UintRangeParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
uint32 Default;
|
|
|
|
[write, Description("Smallest allowable value for the corresponding target instance property")]
|
|
uint32 Min;
|
|
|
|
[write, Description("Largest allowable value for the corresponding target instance property")]
|
|
uint32 Max;
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{5D73662C-698B-4b1f-9B0A-7F8948EC2155}"),
|
|
Description("Defines a default and acceptable range for a real number property")]
|
|
class MSFT_RealRangeParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
Real64 Default;
|
|
|
|
[write, Description("Smallest allowable value for the corresponding target instance property")]
|
|
Real64 Min;
|
|
|
|
[write, Description("Largest allowable value for the corresponding target instance property")]
|
|
Real64 Max;
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{DF926AD7-A988-4012-B52E-9E90DB5D8760}"),
|
|
Description("Defines a default and list of valid values for a signed integer property")]
|
|
class MSFT_SintSetParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
sint32 Default;
|
|
|
|
[write, Description("List of allowable values for the corresponding target instance property")]
|
|
sint32 ValidValues[];
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{F7655F46-3379-484c-8171-E3324E2F3A13}"),
|
|
Description("Defines a default and list of valid values for an unsigned integer property")]
|
|
class MSFT_UintSetParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
uint32 Default;
|
|
|
|
[write, Description("List of allowable values for the corresponding target instance property")]
|
|
uint32 ValidValues[];
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{CC1EA62B-F2EC-4243-B217-78480D1D76C7}"),
|
|
Description("Defines a default and list of valid values for a string property")]
|
|
class MSFT_StringSetParam : MSFT_RangeParam
|
|
{
|
|
[write, Description("Desired value for the corresponding target instance property")]
|
|
string Default;
|
|
|
|
[write, Description("List of allowable values for the corresponding target instance property")]
|
|
string ValidValues[];
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{4520D53D-3E9B-4492-AA92-9C70FC869A1E}"),
|
|
Description("Policy template provides a 'recipe' for creating a class instance")]
|
|
class MSFT_PolicyTemplate
|
|
{
|
|
[key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
|
|
string ID;
|
|
|
|
[key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
|
|
String Domain;
|
|
|
|
[write, Description("Descriptive text describing this Policy Template")]
|
|
String Description;
|
|
|
|
[write, Description("PolicyType which defines the schema for the target instance, may be NULL"
|
|
" in which case, the class definition is assumed to be present on the target machine.")]
|
|
MSFT_PolicyType REF TargetType;
|
|
|
|
[write, Description("A user-friendly name for this template")]
|
|
string Name;
|
|
|
|
[write, NOT_NULL, Description("Namespace in which Target Object is to be created")]
|
|
string TargetNamespace;
|
|
|
|
[write, Description("Class name of the policy object to be created")]
|
|
string TargetClass;
|
|
|
|
[write, Description("Denotes the class instance to be created on the target machine "
|
|
"if class is singleton, then TargetPath is the class name "
|
|
"if class has keys, then TargetPath is relative object path "
|
|
)]
|
|
string TargetPath;
|
|
|
|
[write, Description("Originator of this PolicyTemplate")]
|
|
String Author;
|
|
|
|
[write, Description("Author's organinzation")]
|
|
String SourceOrganization;
|
|
|
|
[write, Description("Last time this object was updated")]
|
|
DateTime ChangeDate;
|
|
|
|
[write, Description("Time that this object was created")]
|
|
DateTime CreationDate;
|
|
};
|
|
|
|
[Dynamic,Provider("PolicTempl"), Locale(1033) : ToInstance, UUID("{6CD2FC3F-EEE7-48e9-AC55-8827496E2389}"),
|
|
Description("used in cases where the target object is not intended to be combined")]
|
|
class MSFT_SimplePolicyTemplate : MSFT_PolicyTemplate
|
|
{
|
|
[Description("The single object to be created as a result of applying this policy")]
|
|
object TargetObject;
|
|
};
|
|
|
|
[Dynamic,Provider("PolicTempl"), Locale(1033) : ToInstance, UUID("{F9E466F8-CFCC-4fa2-B4DE-8338F85C9CC1}"),
|
|
Description("Provides a policy template that can be merged with other templates")]
|
|
class MSFT_MergeablePolicyTemplate : MSFT_PolicyTemplate
|
|
{
|
|
[write, Description("Settings which describe the desired property values "
|
|
"for the target instance.")]
|
|
MSFT_RangeParam RangeSettings[];
|
|
|
|
[Implemented, Static, Description("Merges all like objects into one showing merged output "
|
|
"if merge is successful, then resultant object is returned in obj")]
|
|
Sint32 Merge([IN] MSFT_PolicyTemplate templateList[], [OUT] MSFT_PolicyTemplate mergedTemplate);
|
|
|
|
[Implemented, Static, Description("Resolves a single merged object into target class instance")]
|
|
Sint32 Resolve([IN] MSFT_PolicyTemplate template, [OUT] Object obj);
|
|
|
|
[Implemented, Static, Description("Initializes template with values from base")]
|
|
Sint32 Set([IN] Object base, [OUT] MSFT_PolicyTemplate PolicyObj);
|
|
|
|
[Implemented, Static, Description("Sets a single range in RangeSettings")]
|
|
Sint32 SetRange([IN, OUT] MSFT_PolicyTemplate PolicyObj, [IN] MSFT_RangeParam rangeSetting);
|
|
};
|
|
|
|
[Abstract, Locale(1033) : ToInstance, UUID("{D157AAFD-D42F-45cd-B30B-F67CF152C9F9}"),
|
|
Description("Defines a single rule in a SOM, expressed as a query")]
|
|
class MSFT_Rule
|
|
{
|
|
[NOT_NULL, write, Description("Language in which query is expressed")]
|
|
string QueryLanguage;
|
|
|
|
[NOT_NULL, write, Description("Namespace in which to evaluate query")]
|
|
string TargetNameSpace;
|
|
|
|
[NOT_NULL, write, Description("Query of interest")]
|
|
string Query;
|
|
};
|
|
|
|
[Dynamic,Provider("PolicSOM"), Locale(1033) : ToInstance, UUID("{AE7B614F-AFE0-41ea-807E-3BD3F83CAF66}"),
|
|
Description("Provides a list of rules, expressed as queries "
|
|
"which are evaluated on target machine")]
|
|
class MSFT_SomFilter
|
|
{
|
|
[key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
|
|
string ID;
|
|
|
|
[key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
|
|
String Domain;
|
|
|
|
[write, Description("A user-friendly name for this Som Filter")]
|
|
string Name;
|
|
|
|
[write, Description("Descriptive text describing this Som Filter")]
|
|
String Description;
|
|
|
|
[write, NOT_NULL, Description("Rules to be evaluated")]
|
|
MSFT_Rule Rules[];
|
|
|
|
|
|
[Implemented, Description("Determines whether the queries expressed in Rules apply to this machine. "
|
|
"Returns S_OK (0) if all queries expressed in rules return results; "
|
|
"S_FALSE (1) if they do not; and an applicable WMI error code if an error occurs.")]
|
|
Uint32 Evaluate();
|
|
|
|
[Implemented, Static, Description("evaluates a list of SOMs, returns array result codes matching result of evaluating each")]
|
|
Uint32 BatchEvaluate([IN] MSFT_SomFilter REF filters[], [OUT]Uint32 results[]);
|
|
|
|
[write, Description("Originator of this SomFilter")]
|
|
String Author;
|
|
|
|
[write, Description("Author's organinzation")]
|
|
String SourceOrganization;
|
|
|
|
[write, Description("Last time this object was updated")]
|
|
DateTime ChangeDate;
|
|
|
|
[write, Description("Time that this object was created")]
|
|
DateTime CreationDate;
|
|
|
|
};
|
|
|
|
[Dynamic,Provider("PolicType"), Locale(1033) : ToInstance, UUID("{61FBBE9B-1016-4004-9ACC-0174F5EA4E80}"),
|
|
Description("Communicate schema for policy objects")]
|
|
class MSFT_PolicyType
|
|
{
|
|
[key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
|
|
string ID;
|
|
|
|
[key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
|
|
String Domain;
|
|
|
|
[write, Description("Descriptive text describing this Policy Type")]
|
|
String Description;
|
|
|
|
[write, NOT_NULL, Description("Defines class used by PolicyTemplate")]
|
|
Object ClassDefinition;
|
|
|
|
[write, Description("Any additional class instances needed to define a policy "
|
|
"These will be TemplateBuilders in the case of a CorrelatorTemplate")]
|
|
Object InstanceDefinitions[];
|
|
|
|
[write, Description("Originator of this PolicyType")]
|
|
String Author;
|
|
|
|
[write, Description("Author's organinzation")]
|
|
String SourceOrganization;
|
|
|
|
[write, Description("Last time this object was updated")]
|
|
DateTime ChangeDate;
|
|
|
|
[write, Description("Time that this object was created")]
|
|
DateTime CreationDate;
|
|
};
|
|
|
|
[Dynamic,Provider("PolicGPO"), Locale(1033) : ToInstance, UUID("{074A24E3-F15C-43dc-A494-865428C58FB7}"),
|
|
Description("Specifies the policy template to be delivered to the target machine"
|
|
"written to container specified by DsPath property")]
|
|
class MSFT_WMIGPO
|
|
{
|
|
[key, write, Description("Complete path of the container in which this WMIGPO resides, in LDAP format")]
|
|
String DsPath;
|
|
|
|
[write, NOT_NULL, Description("references to the associated PolicyTemplates")]
|
|
MSFT_PolicyTemplate REF PolicyTemplate[];
|
|
|
|
[read, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
|
|
String Domain;
|
|
};
|
|
|
|
|
|
#pragma namespace("\\\\.\\Root\\Policy\\History")
|
|
|
|
// this schema is nearly a duplicate of the RSOP schema
|
|
// without the RSOP base classes
|
|
|
|
|
|
[Locale(1033) : ToInstance, UUID("{2B159066-C652-474f-A49C-2482FB3F8517}"),
|
|
Description("Corresponds to the MSFT_WMIGPO class")]
|
|
class MSFT_WMIGPOPolicySetting
|
|
{
|
|
[key, Description("a unique identifier for instances of this class")]
|
|
string ID;
|
|
|
|
[write, Description("templates delivered as part of this GPO")]
|
|
RSOP_AppliedPolicyTemplate REF templates[];
|
|
};
|
|
|
|
[Locale(1033) : ToInstance, UUID("{D044BDC4-37A7-43a1-9338-1F1D06577D9F}"),
|
|
Description("wrapper to encapsulate MSFT_PolicyTemplate")]
|
|
class MSFT_AppliedPolicyTemplate
|
|
{
|
|
[write, key, Description("relpath of the template")]
|
|
string templatePath;
|
|
|
|
[write, Description("template delivered")]
|
|
MSFT_PolicyTemplate template;
|
|
};
|
|
|
|
[Locale(1033) : ToInstance, UUID("{8BE067B0-B388-4bb1-8A1C-A4AF2E70AA0B}"),
|
|
Description("wrapper to encapsulate MSFT_PolicyType")]
|
|
class MSFT_AppliedPolicyType
|
|
{
|
|
[write, key, Description("relpath of the type")]
|
|
string typePath;
|
|
|
|
[write, Description("Type object delivered")]
|
|
MSFT_PolicyType type;
|
|
};
|
|
|
|
[Locale(1033) : ToInstance, UUID("{AD34AA24-64A0-4398-B0CF-887BD66F7D10}"),
|
|
Description("object that is created by WMI Policy engine")]
|
|
class MSFT_WmiTargetObject
|
|
{
|
|
[key, write, Description("object is identified by path of target object")]
|
|
string targetPath;
|
|
|
|
[write, Description("templates that participated to create this target object")]
|
|
RSOP_AppliedPolicyTemplate REF templates[];
|
|
|
|
[write, Description("type object associated with these templates")]
|
|
RSOP_AppliedPolicyType REF type;
|
|
|
|
[write, Description("resultant of merging the templates")]
|
|
MSFT_PolicyTemplate MergedTemplate;
|
|
|
|
[write, Description("object created by resolving the merged template")]
|
|
Object TargetInstance;
|
|
};
|
|
|
|
|