ConfigurationName :
DependsOn :
ModuleName : PSDSCResources
ModuleVersion : 2.9.0.0
PsDscRunAsCredential :
ResourceId :
SourceInfo :
CustomProperties : {Name = Description, Value = Provides services to collect and archive Windows Server system
data., Path = ServerComponent, Name = DisplayName, Value = System Data Archiver, Path =
ServerComponent, Name = Id, Value = 1043, Path = ServerComponent, Name = Type, Value = Feature,
Path = ServerComponent...}
Description : Provides services to collect and archive Windows Server system data.
DisplayName : System Data Archiver
Ensure : Present
LogLevel : WarningsInfo
LogPath : C:\Windows\Logs\DISM\dism.log
Name : SystemDataArchiver
NoWindowsUpdateCheck :
RemoveFilesOnDisable :
PSComputerName : localhost
Optional Feature without Custom Properties:
PS C:\Windows\system32> Invoke-DscResource -Name "WindowsOptionalFeature" -Method Get -ModuleName "PSDSCResources" -Property @{Name = "HypervisorPlatform"; Ensure = 'Present'}
A general error occurred that is not covered by a more specific error code.
When the WindowsOptionalFeature DSC resource Get method is invoked by the LCM, an error is thrown if the Optional Feature has no custom properties.
Optional Feature with Custom Properties: PS C:\Windows\system32> Invoke-DscResource -Name "WindowsOptionalFeature" -Method Get -ModuleName "PSDSCResources" -Property @{Name = "SystemDataArchiver"; Ensure = 'Present'}
ConfigurationName : DependsOn : ModuleName : PSDSCResources ModuleVersion : 2.9.0.0 PsDscRunAsCredential : ResourceId : SourceInfo : CustomProperties : {Name = Description, Value = Provides services to collect and archive Windows Server system data., Path = ServerComponent, Name = DisplayName, Value = System Data Archiver, Path = ServerComponent, Name = Id, Value = 1043, Path = ServerComponent, Name = Type, Value = Feature, Path = ServerComponent...} Description : Provides services to collect and archive Windows Server system data. DisplayName : System Data Archiver Ensure : Present LogLevel : WarningsInfo LogPath : C:\Windows\Logs\DISM\dism.log Name : SystemDataArchiver NoWindowsUpdateCheck : RemoveFilesOnDisable : PSComputerName : localhost![BeforeChangeWithCustomProperties](https://user-images.githubusercontent.com/68877274/88601915-85c77f00-d026-11ea-86b9-47712e3cda1a.png)
Optional Feature without Custom Properties: PS C:\Windows\system32> Invoke-DscResource -Name "WindowsOptionalFeature" -Method Get -ModuleName "PSDSCResources" -Property @{Name = "HypervisorPlatform"; Ensure = 'Present'} A general error occurred that is not covered by a more specific error code.
Windows\Desired State Configuration Event Error 4250 thrown: Job {FCA666F0-D06E-11EA-AD33-248A07A40AF1} : Message Specified cast is not valid. HResult -2147467262 StackTrack at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.ConvertCimInstanceToHashTable(CimInstance cimInstance, Boolean bWrap) at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.ConvertCimInstanceToHashTable(CimInstance cimInstance, Boolean bWrap) at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.ConvertCimInstanceToHashTable(CimInstance cimInstance, Boolean bWrap) at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.GetJsonStringArrayStatusValue(Object value, IntPtr& statusInstanceHandle, UInt32& getActionStatusCode) at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.AddSendStatusParametersFromStatusInformation(PowerShell powershell, IntPtr statusInformationPtr, UInt32 reportType, IntPtr& errorInstanceHandle, UInt32& getActionStatusCode) at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DownloadManagerBase.SendStatusReport(IntPtr metaConfigHandle, IntPtr& errorInstanceHandle, IntPtr statusInformation, UInt32 reportType, UInt32& getActionStatusCode)![DSCEvent4250](https://user-images.githubusercontent.com/68877274/88602233-36ce1980-d027-11ea-9c20-d8326e1f42eb.png)