From 00be7c8e9d359fb745ecebe59299ba9cb16e4d9b Mon Sep 17 00:00:00 2001 From: anmenaga Date: Sun, 23 Aug 2020 23:41:40 -0700 Subject: [PATCH] simplified schema --- .../BaseRegistration/BaseResource.schema.json | 551 ++-------- .../MSFT_DSCMetaConfiguration.json | 639 ++++-------- ...aConfigurationExtensionClasses.schema.json | 981 +++++------------- .../PSDesiredStateConfiguration.psm1 | 46 +- 4 files changed, 584 insertions(+), 1633 deletions(-) diff --git a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/BaseResource.schema.json b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/BaseResource.schema.json index b7fd421..5b74c9e 100644 --- a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/BaseResource.schema.json +++ b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/BaseResource.schema.json @@ -1,595 +1,232 @@ [ { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_Credential", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_Credential", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "UserName", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "MaxLen", - "Value": 256, - "CimType": "UInt32", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "MaxLen": 256 + } }, { "Name": "Password", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_BaseResource", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "OMI_BaseResource", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "ResourceId", - "Value": null, "CimType": "String", - "Flags": "Property, Required, NullValue", - "Qualifiers": [ - { - "Name": "Required", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Required": true + } }, { "Name": "SourceInfo", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "DependsOn", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "ModuleName", - "Value": null, "CimType": "String", - "Flags": "Property, Required, NullValue", - "Qualifiers": [ - { - "Name": "Required", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Required": true + } }, { "Name": "ModuleVersion", - "Value": null, "CimType": "String", - "Flags": "Property, Required, NullValue", - "Qualifiers": [ - { - "Name": "Required", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Required": true + } }, { "Name": "ConfigurationName", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "PsDscRunAsCredential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "Write": true, + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_KeyValuePair", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_KeyValuePair", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "Key", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "Value", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_BaseConfigurationProviderRegistration", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_BaseConfigurationProviderRegistration", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "ClassName", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "DSCEngineCompatVersion", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "DSCModuleVersion", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_CimConfigurationProviderRegistration", - "Path": null - }, - "CimSuperClassName": "MSFT_BaseConfigurationProviderRegistration", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_CimConfigurationProviderRegistration", + "ClassVersion": "1.0.0", + "SuperClassName": "MSFT_BaseConfigurationProviderRegistration", + "ClassProperties": [ { "Name": "Namespace", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_PSConfigurationProviderRegistration", - "Path": null - }, - "CimSuperClassName": "MSFT_BaseConfigurationProviderRegistration", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_PSConfigurationProviderRegistration", + "ClassVersion": "1.0.0", + "SuperClassName": "MSFT_BaseConfigurationProviderRegistration", + "ClassProperties": [ { "Name": "ModuleName", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProviderPath", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ModulePath", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_ConfigurationDocument", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "OMI_ConfigurationDocument", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "Version", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "Author", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "Copyright", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "HelpInfoUri", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ContentType", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "GenerationDate", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "GenerationHost", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "Name", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "MinimumCompatibleVersion", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "CompatibleVersionAdditionalProperties", - "Value": null, - "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "StringArray" }, { "Name": "UseCms", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_MetaConfigurationResource", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "OMI_MetaConfigurationResource", + "ClassVersion": "1.0.0", + "ClassProperties": [ { "Name": "ResourceId", - "Value": null, "CimType": "String", - "Flags": "Property, Required, NullValue", - "Qualifiers": [ - { - "Name": "Required", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Required": true + } }, { "Name": "SourceInfo", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_ResourceModuleManager", - "Path": null - }, - "CimSuperClassName": "OMI_MetaConfigurationResource", - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [] + "ClassName": "OMI_ResourceModuleManager", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_MetaConfigurationResource" }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_ConfigurationDownloadManager", - "Path": null - }, - "CimSuperClassName": "OMI_MetaConfigurationResource", - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [] + "ClassName": "OMI_ConfigurationDownloadManager", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_MetaConfigurationResource" }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "OMI_ReportManager", - "Path": null - }, - "CimSuperClassName": "OMI_MetaConfigurationResource", - "CimClassQualifiers": [ - { - "Name": "Abstract", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [] + "ClassName": "OMI_ReportManager", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_MetaConfigurationResource" } ] diff --git a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_DSCMetaConfiguration.json b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_DSCMetaConfiguration.json index 53eef47..16b0c45 100644 --- a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_DSCMetaConfiguration.json +++ b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_DSCMetaConfiguration.json @@ -1,429 +1,218 @@ -[ - { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_DSCMetaConfiguration", - "Path": null +{ + "ClassName": "MSFT_DSCMetaConfiguration", + "FriendlyName": "LocalConfigurationManager", + "ClassVersion": "1.0.0", + "ClassProperties": [ + { + "Name": "ConfigurationModeFrequencyMins", + "CimType": "UInt32" }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "LocalConfigurationManager", - "CimType": "String", - "Flags": "EnableOverride, Restricted" + { + "Name": "RebootNodeIfNeeded", + "CimType": "Boolean" + }, + { + "Name": "ConfigurationMode", + "CimType": "String", + "Qualifiers": { + "ValueMap": [ + "ApplyOnly", + "ApplyAndMonitor", + "ApplyAndAutoCorrect", + "MonitorOnly" + ], + "Values": [ + "ApplyOnly", + "ApplyAndMonitor", + "ApplyAndAutoCorrect", + "MonitorOnly" + ] } - ], - "CimClassProperties": [ - { - "Name": "ConfigurationModeFrequencyMins", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "RebootNodeIfNeeded", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "ConfigurationMode", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "ApplyOnly", - "ApplyAndMonitor", - "ApplyAndAutoCorrect", - "MonitorOnly" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "ApplyOnly", - "ApplyAndMonitor", - "ApplyAndAutoCorrect", - "MonitorOnly" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } + }, + { + "Name": "ActionAfterReboot", + "CimType": "String", + "Qualifiers": { + "ValueMap": [ + "ContinueConfiguration", + "StopConfiguration" ], - "ReferenceClassName": null - }, - { - "Name": "ActionAfterReboot", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "ContinueConfiguration", - "StopConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "ContinueConfiguration", - "StopConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null - }, - { - "Name": "Credential", - "Value": null, - "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" - }, - { - "Name": "RefreshMode", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null - }, - { - "Name": "CertificateID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "ConfigurationID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "DownloadManagerName", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "DownloadManagerCustomData", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_KeyValuePair", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_KeyValuePair" - }, - { - "Name": "RefreshFrequencyMins", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "AllowModuleOverwrite", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "DebugMode", - "Value": null, - "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "None", - "ForceModuleImport", - "All", - "ResourceScriptBreakAll", - "ResourceScriptBreakpoint" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "None", - "ForceModuleImport", - "All", - "ResourceScriptBreakAll", - "ResourceScriptBreakpoint" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null - }, - { - "Name": "LCMVersion", - "Value": null, - "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null - }, - { - "Name": "LCMCompatibleVersions", - "Value": null, - "CimType": "StringArray", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null - }, - { - "Name": "LCMState", - "Value": null, - "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "ValueMap", - "Value": [ - "Idle", - "Busy", - "PendingReboot", - "PendingConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Idle", - "Busy", - "PendingReboot", - "PendingConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null - }, - { - "Name": "LCMStateDetail", - "Value": null, - "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null - }, - { - "Name": "ConfigurationDownloadManagers", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ConfigurationDownloadManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ConfigurationDownloadManager" - }, - { - "Name": "ResourceModuleManagers", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ResourceModuleManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ResourceModuleManager" - }, - { - "Name": "ReportManagers", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ReportManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ReportManager" - }, - { - "Name": "PartialConfigurations", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_PartialConfiguration", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_PartialConfiguration" - }, - { - "Name": "StatusRetentionTimeInDays", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "AgentId", - "Value": null, - "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null - }, - { - "Name": "SignatureValidationPolicy", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null - }, - { - "Name": "SignatureValidations", - "Value": null, - "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_SignatureValidation", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_SignatureValidation" - }, - { - "Name": "MaximumDownloadSizeMB", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "Values": [ + "ContinueConfiguration", + "StopConfiguration" + ] } - ] - } -] + }, + { + "Name": "Credential", + "CimType": "Instance", + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } + }, + { + "Name": "RefreshMode", + "CimType": "String", + "Qualifiers": { + "ValueMap": [ + "Push", + "Pull", + "Disabled" + ], + "Values": [ + "Push", + "Pull", + "Disabled" + ] + } + }, + { + "Name": "CertificateID", + "CimType": "String" + }, + { + "Name": "ConfigurationID", + "CimType": "String" + }, + { + "Name": "DownloadManagerName", + "CimType": "String" + }, + { + "Name": "DownloadManagerCustomData", + "CimType": "InstanceArray", + "ReferenceClassName": "MSFT_KeyValuePair", + "Qualifiers": { + "EmbeddedInstance": "MSFT_KeyValuePair" + } + }, + { + "Name": "RefreshFrequencyMins", + "CimType": "UInt32" + }, + { + "Name": "AllowModuleOverwrite", + "CimType": "Boolean" + }, + { + "Name": "DebugMode", + "CimType": "StringArray", + "Qualifiers": { + "ValueMap": [ + "None", + "ForceModuleImport", + "All", + "ResourceScriptBreakAll", + "ResourceScriptBreakpoint" + ], + "Values": [ + "None", + "ForceModuleImport", + "All", + "ResourceScriptBreakAll", + "ResourceScriptBreakpoint" + ] + } + }, + { + "Name": "LCMVersion", + "CimType": "String", + "Qualifiers": { + "Read": true + } + }, + { + "Name": "LCMCompatibleVersions", + "CimType": "StringArray", + "Qualifiers": { + "Read": true + } + }, + { + "Name": "LCMState", + "CimType": "String", + "Qualifiers": { + "Read": true, + "ValueMap": [ + "Idle", + "Busy", + "PendingReboot", + "PendingConfiguration" + ], + "Values": [ + "Idle", + "Busy", + "PendingReboot", + "PendingConfiguration" + ] + } + }, + { + "Name": "LCMStateDetail", + "CimType": "String", + "Qualifiers": { + "Read": true + } + }, + { + "Name": "ConfigurationDownloadManagers", + "CimType": "InstanceArray", + "ReferenceClassName": "OMI_ConfigurationDownloadManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ConfigurationDownloadManager" + } + }, + { + "Name": "ResourceModuleManagers", + "CimType": "InstanceArray", + "ReferenceClassName": "OMI_ResourceModuleManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ResourceModuleManager" + } + }, + { + "Name": "ReportManagers", + "CimType": "InstanceArray", + "ReferenceClassName": "OMI_ReportManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ReportManager" + } + }, + { + "Name": "PartialConfigurations", + "CimType": "InstanceArray", + "ReferenceClassName": "MSFT_PartialConfiguration", + "Qualifiers": { + "EmbeddedInstance": "MSFT_PartialConfiguration" + } + }, + { + "Name": "StatusRetentionTimeInDays", + "CimType": "UInt32" + }, + { + "Name": "AgentId", + "CimType": "String", + "Qualifiers": { + "Read": true + } + }, + { + "Name": "SignatureValidationPolicy", + "CimType": "String" + }, + { + "Name": "SignatureValidations", + "CimType": "InstanceArray", + "ReferenceClassName": "MSFT_SignatureValidation", + "Qualifiers": { + "EmbeddedInstance": "MSFT_SignatureValidation" + } + }, + { + "Name": "MaximumDownloadSizeMB", + "CimType": "UInt32" + } + ] +} diff --git a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_MetaConfigurationExtensionClasses.schema.json b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_MetaConfigurationExtensionClasses.schema.json index aa57c8f..7bfee2c 100644 --- a/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_MetaConfigurationExtensionClasses.schema.json +++ b/src/PSDesiredStateConfiguration/Configuration/BaseRegistration/MSFT_MetaConfigurationExtensionClasses.schema.json @@ -1,965 +1,454 @@ [ { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_WebDownloadManager", - "Path": null - }, - "CimSuperClassName": "OMI_ConfigurationDownloadManager", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "ConfigurationRepositoryWeb", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_WebDownloadManager", + "FriendlyName": "ConfigurationRepositoryWeb", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_ConfigurationDownloadManager", + "ClassProperties": [ { "Name": "ServerURL", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "CertificateID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "AllowUnsecureConnection", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" }, { "Name": "RegistrationKey", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ConfigurationNames", - "Value": null, - "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "StringArray" }, { "Name": "ProxyURL", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProxyCredential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_FileDownloadManager", - "Path": null - }, - "CimSuperClassName": "OMI_ConfigurationDownloadManager", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "ConfigurationRepositoryShare", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_FileDownloadManager", + "FriendlyName": "ConfigurationRepositoryShare", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_ConfigurationDownloadManager", + "ClassProperties": [ { "Name": "SourcePath", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "Credential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_WebResourceManager", - "Path": null - }, - "CimSuperClassName": "OMI_ResourceModuleManager", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "ResourceRepositoryWeb", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_WebResourceManager", + "FriendlyName": "ResourceRepositoryWeb", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_ResourceModuleManager", + "ClassProperties": [ { "Name": "ServerURL", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "CertificateID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "AllowUnsecureConnection", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" }, { "Name": "RegistrationKey", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProxyURL", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProxyCredential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_FileResourceManager", - "Path": null - }, - "CimSuperClassName": "OMI_ResourceModuleManager", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "ResourceRepositoryShare", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_FileResourceManager", + "FriendlyName": "ResourceRepositoryShare", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_ResourceModuleManager", + "ClassProperties": [ { "Name": "SourcePath", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "Credential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_WebReportManager", - "Path": null - }, - "CimSuperClassName": "OMI_ReportManager", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "ReportServerWeb", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_WebReportManager", + "FriendlyName": "ReportServerWeb", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_ReportManager", + "ClassProperties": [ { "Name": "ServerURL", - "Value": null, "CimType": "String", - "Flags": "Property, Key, NullValue", - "Qualifiers": [ - { - "Name": "Key", - "Value": true, - "CimType": "Boolean", - "Flags": "DisableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Key": true + } }, { "Name": "CertificateID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "AllowUnsecureConnection", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" }, { "Name": "RegistrationKey", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProxyURL", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ProxyCredential", - "Value": null, "CimType": "Instance", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_Credential", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_Credential" + "ReferenceClassName": "MSFT_Credential", + "Qualifiers": { + "EmbeddedInstance": "MSFT_Credential" + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_PartialConfiguration", - "Path": null - }, - "CimSuperClassName": "OMI_MetaConfigurationResource", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "PartialConfiguration", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_PartialConfiguration", + "FriendlyName": "PartialConfiguration", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_MetaConfigurationResource", + "ClassProperties": [ { "Name": "Description", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "ExclusiveResources", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "ConfigurationSource", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "ResourceModuleSource", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "DependsOn", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "RefreshMode", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "Push", + "Pull", + "Disabled" + ], + "Values": [ + "Push", + "Pull", + "Disabled" + ] + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_SignatureValidation", - "Path": null - }, - "CimSuperClassName": "OMI_MetaConfigurationResource", - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "1.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "SignatureValidation", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_SignatureValidation", + "FriendlyName": "SignatureValidation", + "ClassVersion": "1.0.0", + "SuperClassName": "OMI_MetaConfigurationResource", + "ClassProperties": [ { "Name": "TrustedStorePath", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "Write", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Write": true + } }, { "Name": "SignedItemType", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "Configuration", - "Module" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Configuration", - "Module" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "Configuration", + "Module" + ], + "Values": [ + "Configuration", + "Module" + ] + } } ] }, { - "CimSystemProperties": { - "Namespace": null, - "ServerName": null, - "ClassName": "MSFT_DSCMetaConfigurationV2", - "Path": null - }, - "CimSuperClassName": null, - "CimClassQualifiers": [ - { - "Name": "ClassVersion", - "Value": "2.0.0", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - }, - { - "Name": "FriendlyName", - "Value": "Settings", - "CimType": "String", - "Flags": "EnableOverride, Restricted" - } - ], - "CimClassProperties": [ + "ClassName": "MSFT_DSCMetaConfigurationV2", + "FriendlyName": "Settings", + "ClassVersion": "2.0.0", + "ClassProperties": [ { "Name": "ConfigurationModeFrequencyMins", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "UInt32" }, { "Name": "RebootNodeIfNeeded", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" }, { "Name": "ConfigurationMode", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "ApplyOnly", - "ApplyAndMonitor", - "ApplyAndAutoCorrect", - "MonitorOnly" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "ApplyOnly", - "ApplyAndMonitor", - "ApplyAndAutoCorrect", - "MonitorOnly" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "ApplyOnly", + "ApplyAndMonitor", + "ApplyAndAutoCorrect", + "MonitorOnly" + ], + "Values": [ + "ApplyOnly", + "ApplyAndMonitor", + "ApplyAndAutoCorrect", + "MonitorOnly" + ] + } }, { "Name": "ActionAfterReboot", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "ContinueConfiguration", - "StopConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "ContinueConfiguration", - "StopConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "ContinueConfiguration", + "StopConfiguration" + ], + "Values": [ + "ContinueConfiguration", + "StopConfiguration" + ] + } }, { "Name": "RefreshMode", - "Value": null, "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Push", - "Pull", - "Disabled" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "Push", + "Pull", + "Disabled" + ], + "Values": [ + "Push", + "Pull", + "Disabled" + ] + } }, { "Name": "CertificateID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "ConfigurationID", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "RefreshFrequencyMins", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "UInt32" }, { "Name": "AllowModuleOverwrite", - "Value": null, - "CimType": "Boolean", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "Boolean" }, { "Name": "DebugMode", - "Value": null, "CimType": "StringArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "ValueMap", - "Value": [ - "None", - "ForceModuleImport", - "All", - "ResourceScriptBreakAll", - "ResourceScriptBreakpoint" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "None", - "ForceModuleImport", - "All", - "ResourceScriptBreakAll", - "ResourceScriptBreakpoint" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "ValueMap": [ + "None", + "ForceModuleImport", + "All", + "ResourceScriptBreakAll", + "ResourceScriptBreakpoint" + ], + "Values": [ + "None", + "ForceModuleImport", + "All", + "ResourceScriptBreakAll", + "ResourceScriptBreakpoint" + ] + } }, { "Name": "LCMVersion", - "Value": null, "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Read": true + } }, { "Name": "LCMCompatibleVersions", - "Value": null, "CimType": "StringArray", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Read": true + } }, { "Name": "LCMState", - "Value": null, "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "ValueMap", - "Value": [ - "Idle", - "Busy", - "PendingReboot", - "PendingConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass" - }, - { - "Name": "Values", - "Value": [ - "Idle", - "Busy", - "PendingReboot", - "PendingConfiguration" - ], - "CimType": "StringArray", - "Flags": "EnableOverride, ToSubclass, Translatable" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Read": true, + "ValueMap": [ + "Idle", + "Busy", + "PendingReboot", + "PendingConfiguration" + ], + "Values": [ + "Idle", + "Busy", + "PendingReboot", + "PendingConfiguration" + ] + } }, { "Name": "LCMStateDetail", - "Value": null, "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Read": true + } }, { "Name": "ConfigurationDownloadManagers", - "Value": null, "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ConfigurationDownloadManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ConfigurationDownloadManager" + "ReferenceClassName": "OMI_ConfigurationDownloadManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ConfigurationDownloadManager" + } }, { "Name": "ResourceModuleManagers", - "Value": null, "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ResourceModuleManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ResourceModuleManager" + "ReferenceClassName": "OMI_ResourceModuleManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ResourceModuleManager" + } }, { "Name": "ReportManagers", - "Value": null, "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "OMI_ReportManager", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "OMI_ReportManager" + "ReferenceClassName": "OMI_ReportManager", + "Qualifiers": { + "EmbeddedInstance": "OMI_ReportManager" + } }, { "Name": "PartialConfigurations", - "Value": null, "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_PartialConfiguration", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_PartialConfiguration" + "ReferenceClassName": "MSFT_PartialConfiguration", + "Qualifiers": { + "EmbeddedInstance": "MSFT_PartialConfiguration" + } }, { "Name": "StatusRetentionTimeInDays", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "UInt32" }, { "Name": "AgentId", - "Value": null, "CimType": "String", - "Flags": "Property, ReadOnly, NullValue", - "Qualifiers": [ - { - "Name": "Read", - "Value": true, - "CimType": "Boolean", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": null + "Qualifiers": { + "Read": true + } }, { "Name": "SignatureValidationPolicy", - "Value": null, - "CimType": "String", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "String" }, { "Name": "SignatureValidations", - "Value": null, "CimType": "InstanceArray", - "Flags": "Property, NullValue", - "Qualifiers": [ - { - "Name": "EmbeddedInstance", - "Value": "MSFT_SignatureValidation", - "CimType": "String", - "Flags": "EnableOverride, ToSubclass" - } - ], - "ReferenceClassName": "MSFT_SignatureValidation" + "ReferenceClassName": "MSFT_SignatureValidation", + "Qualifiers": { + "EmbeddedInstance": "MSFT_SignatureValidation" + } }, { "Name": "MaximumDownloadSizeMB", - "Value": null, - "CimType": "UInt32", - "Flags": "Property, NullValue", - "Qualifiers": [], - "ReferenceClassName": null + "CimType": "UInt32" } ] } diff --git a/src/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1 b/src/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1 index cae88e1..5b9f26e 100644 --- a/src/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1 +++ b/src/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1 @@ -3932,7 +3932,36 @@ function PrepareCimClassesForJsonConvertion if (-not (CimPropertyIsInherited -PropertyName $property.Name -ParentClass $class.CimSuperClass)) { Write-Verbose "Adding property $($property.Name)" - $properties.Add($property); + + $qualifiers = New-Object -TypeName 'System.Collections.Generic.Dictionary[System.String,System.Object]' + foreach($qualifier in $property.Qualifiers) + { + $qualifiers.Add($qualifier.Name, $qualifier.Value) + } + + if ($qualifiers.Count -eq 0) { $qualifiers = $null} + + $flags = $property.Flags + $flags = $flags -band -bnot [Microsoft.Management.Infrastructure.CimFlags]::Property # this is set for all properties + $flags = $flags -band -bnot [Microsoft.Management.Infrastructure.CimFlags]::NullValue # this is set for all properties + $flags = $flags -band -bnot [Microsoft.Management.Infrastructure.CimFlags]::Required # this is also specified in Qualifiers + $flags = $flags -band -bnot [Microsoft.Management.Infrastructure.CimFlags]::Key # this is also specified in Qualifiers + $flags = $flags -band -bnot [Microsoft.Management.Infrastructure.CimFlags]::ReadOnly # this is also specified in Qualifiers + if ($flags -eq 0) { $flags = $null} + + $p = [pscustomobject]@{ + Name = $property.Name + Value = $property.Value + CimType = $property.CimType + Flags = $flags + ReferenceClassName = $property.ReferenceClassName + Qualifiers = $qualifiers + } + + # remove properties that have null value + $p.PSobject.Properties | % {if ($_.Value -eq $null) {$p.PSobject.Properties.Remove($_.Name)}} + + $properties.Add($p); } else { @@ -3940,14 +3969,21 @@ function PrepareCimClassesForJsonConvertion } } + if ($properties.Count -eq 0) { $properties = $null} + # construct the processed class $processedClass = [pscustomobject]@{ - CimSystemProperties = $class.CimSystemProperties - CimSuperClassName = $class.CimSuperClassName - CimClassQualifiers = $class.CimClassQualifiers - CimClassProperties = $properties + ClassName = $class.CimSystemProperties.ClassName + FriendlyName = ($class.CimClassQualifiers | Where-Object {$_.Name -eq "FriendlyName"}).Value + ClassVersion = ($class.CimClassQualifiers | Where-Object {$_.Name -eq "ClassVersion"}).Value + Description = ($class.CimClassQualifiers | Where-Object {$_.Name -eq "Description"}).Value + SuperClassName = $class.CimSuperClassName + ClassProperties = $properties } + # remove properties that have null value + $processedClass.PSobject.Properties | % {if ($_.Value -eq $null) {$processedClass.PSobject.Properties.Remove($_.Name)}} + $resultList.Add($processedClass) }