Description
While adding PartitionStyle
parameter to Disk (see #137), I realized that the name of the CIM class implemented in the Disk resource (MSFT_Disk
) is the same name as the built-in CIM Class (https://msdn.microsoft.com/en-us/library/windows/desktop/hh830493(v=vs.85).aspx).
This causes some odd behavior, such as Get-TargetResource
to return an object that contains both the parameters defined in the resource MOF and the built in CIM class definition. This also results in any property that exists in the build in CIM Class definition can not be set when returned by Get-TargetResource
. So when I tried to implement the PartitionStyle
parameter, it worked correctly in Set-TargetResource
and Test-TargetResource
, but Get-TargetResource
would always return the default value from the built-in CIM class (which was Unknown
).
This behavior only resulted when xStorage
was renamed StorageDsc
.
To work around this issue for now I'm going to use the name PartitionFormat
for the resource parameter.
In the longer term I think it might be worth considering renaming the resource as I'm not sure if there are any other nasty side effects with conflicting with one of the built-in CIM classes. This would be a significant BREAKING CHANGE however.
@johlju - any thoughts on this?