-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disk Resource defines CIM class MSFT_Disk which is a Windows built-in CIM class #167
Comments
As per discussion on Gitter, let see if we can change the prefix 'MSFT' to 'MSFTDSC' for this particular resource to avoid a breaking change. |
This looks like something I complained about on MSDN late 2017, with issues stemming from 2015 Get-Disk -BusType now has an enumeration for NVME, however the same information is harder to collect in traditional cmd. DISKPART A moderator on MSDN told me that MSFT_Disk wasn't a base class.. so I stopped bothering to provide feedback and just use my own fixes for WinPE. I also believe that the recent SD Card fiasco is related to this. I'll be back when I return to my pc as I'm afk found the post: adding so I can continue my old project https://social.microsoft.com/Forums/en-US/e3b57025-a37f-48e2-b260-c92845fd5132/help-a-student-with-consumeroem-windows-redeployment-solutions-to-prevent-bad-upgrade-or-install?forum=Offtopic |
Thanks for the info BeoBeum! |
@PlagueHO SCSIBus and InterfaceType don't have any corresponding data pairs with MSFT_Disk. As I'm not at my computer, I haven't checked, but I'm fairly sure that Win32_DiskDrive has no way to return a BusType for NVME since I last checked in #2016. https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-diskdrive |
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 byGet-TargetResource
. So when I tried to implement thePartitionStyle
parameter, it worked correctly inSet-TargetResource
andTest-TargetResource
, butGet-TargetResource
would always return the default value from the built-in CIM class (which wasUnknown
).This behavior only resulted when
xStorage
was renamedStorageDsc
.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?
The text was updated successfully, but these errors were encountered: