Last active
August 27, 2015 15:29
-
-
Save Dan1el42/713e45267f43e2b042d4 to your computer and use it in GitHub Desktop.
Bug in PowerShell v5 version of 2016 TP3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get-DscResource -Module TestBug | Select-Object -ExpandProperty Properties | |
| # Un-comment the ValidateNotNullEmpty attribute to repro the bug | |
| enum Ensure | |
| { | |
| Present | |
| Absent | |
| } | |
| [DscResource()] | |
| class TestBug | |
| { | |
| [DscProperty(Key)] | |
| #[ValidateNotNullOrEmpty()] | |
| [System.String] | |
| $DriveLetter | |
| [DscProperty(Mandatory)] | |
| [System.String] | |
| $Path | |
| [DscProperty(Mandatory)] | |
| [Ensure] | |
| $Ensure | |
| [void] Set() | |
| { | |
| } | |
| [bool] Test () | |
| { | |
| return $true | |
| } | |
| [TestBug] Get() | |
| { | |
| return $this | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment