Comments (4)
Issue may that test-resource does not return false for a mismatch like the other tests.
# Drive size
if ($Size)
{
if ($partition.Size -ne $Size)
{
# The partition size mismatches but can't be changed (yet)
Write-Verbose -Message ( @(
"$($MyInvocation.MyCommand): "
$($LocalizedData.DriveSizeMismatchMessage `
-f $DriveLetter,$Partition.Size,$Size)
) -join '' )
} # if
} # if
from storagedsc.
Hi @VazquezTech - Thank you for reporting this. You are quite correct. This is a known limitation of the resource. This has been on my todo list but I haven't had time to look into it.
This is actually a duplicate of issue #11. It requires the destructive switch (is discussed in #50) to be implemented to allow destructive changes to be made to a disk (in this case resizing the partition).
We choose to return $true when a size mismatch occurs to prevent the Set-TargetResource firing when we can't actually do anything to resolve the size mismatch (yet).
But as this is a duplicate of issue #11, can we close this issue and raise and further discussion in that one?
from storagedsc.
from storagedsc.
Thanks @VazquezTech - I'll try and get to the issue #11 when I get time (seem to be very short of it these days).
from storagedsc.
Related Issues (20)
- Enable Code Coverage Reporting
- StorageDSC.Common: Assert-AccessPathValid does not properly validate slashes. HOT 1
- Get-DiskByIdentifier: Allow selection based on Serial Number
- Disk with Number '2' is already initialized with partition style '' but 'MBR' is required. HOT 1
- Update Azure DevOps Pipeline Images
- Update CI Pipeline Files from Latest Pattern
- Convert to class-based resources
- Convert tests to Pester 5
- DSC_Disk trigers defrag HOT 1
- Get-DiskByIdentifier: Allow FriendlyName property to be used as a disk identifier HOT 1
- Automatic Documentation Generation Fails on Ubuntu-22.04 build image
- Access denied to mount iso HOT 15
- OpticalDiskDriveLetter: The optical disk 1 could not be found in the system on Azure Windows Server 2022
- DSC_Disk: Add support for creating Dev Drive volume HOT 6
- VirtualHardDisk: New resource proposal HOT 3
- The deploy fails because there is a space in a tag in the module manifest HOT 3
- Trigger BREAKING CHANGE from PR #278 HOT 1
- Dev Drive DSC error message when not run as admin HOT 2
- OpticalDiskDriveLetter: DVD Drive for Windows Server Gen2 (UEFI) OS Images filtered HOT 12
- Make Supporting Helper Functions Public so that they can be tested/autodoced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storagedsc.