Closed DelectableMechanisations closed 6 years ago
Hi @DelectableMechanisations - thank you so much for the kind compliments! The community is definitely working really hard to bring the quality up of all modules in the DSC Resource kit. It makes me happy to know it is noticed :grin:
Anyway, on to the MBR: actually I had noticed this too sometime back, but for some reason never added the feature. But if you've got code and would be happy to contribute it to the resource kit then we're more than happy to accept it - the more help the better! This would be a great feature to get implemented.
@DelectableMechanisations Do you mind if I make a PR on your behalf to get this useful addition merged?
It would be great if this gets merged. Would totally help my use case!
I'm having some trouble with the xDisk DSC Resource.
To give you some background I have written a DSC Bootloader script that dynamically generates a DSC Configuration Data file (.psd1) and, among other things, adds the server's disks into this. Here is the relevant sample portion of my Configuration Data file:
For completeness here is the portion of the DSC Composite resource that deals with this block of data:
Running 'Test-DscConfiguration' returns $false on the C: drive (but works fine for all other disks). Checking the Verbose output reveals that it is because it is configured with MBR instead of GPT.
[[xDisk]DiskProvision_C_TS2016_DEV01_C_SystemOS::[cBaseStorage]CCCStorage] Test-TargetResource: Disk with UniqueId 'SCSI\DISK&VEN_VMWARE&PROD_VIRTUAL_DISK\5&1982005&0&000000:TS2016-dev01' is initialized with 'MBR' partition style. GPT required.
Reviewing the code for this resource I can see that 'Test-TargetResource' is hardcoded to return $false if the partition style is not GPT.
Are there any plans to update this in the future so that it works with both GPT and MBR?
I have made my own version of this resource (cDisk) with a dedicated 'PartitionStyle' parameter that I'm happy to share.
OS: Windows Server 2016 and PowerShell v5 DSC Resource: xStorage (dev branch)
P.S. Not related to my issue but you people are doing a great job keeping all the DSC Resources up to date. I've been tinkering with DSC for about 18 months now and the quality of coding I saw back then to what I'm seeing now is just so much higher. The resources have a more modular design, there's a 'Get-Help' section on most of the functions and most of the DSC properties now have descriptions.
Keep up the good work people!