Skip to content

Commit

Permalink
Merge pull request microsoft#2133 from NikCharlebois/Fix1738
Browse files Browse the repository at this point in the history
Fix microsoft#1738 - Default Ensure property to $true
  • Loading branch information
NikCharlebois authored Jul 22, 2022
2 parents 6b41001 + 14eeefa commit 9fb8973
Show file tree
Hide file tree
Showing 27 changed files with 78 additions and 76 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
FIXES [#1691](https://github.com/microsoft/Microsoft365DSC/issues/1691)
* REPORT: Fixed an issue where if the ModuleVersion was not specified, that the file would fail to properly get parsed.
FIXES [#1970](https://github.com/microsoft/Microsoft365DSC/issues/1970)
* Resources implementing the Ensure parameter now defaults its value to $true.
FIXES [#1738](https://github.com/microsoft/Microsoft365DSC/issues/1738)

# 1.22.720.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function Set-TargetResource
[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -291,7 +291,7 @@ function Test-TargetResource
[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function Set-TargetResource
[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -286,7 +286,7 @@ function Test-TargetResource
[Parameter()]
[ValidateSet("Present", "Absent")]
[System.String]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function Get-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -338,7 +338,7 @@ function Set-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -556,7 +556,7 @@ function Test-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function Get-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -571,7 +571,7 @@ function Set-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -883,7 +883,7 @@ function Test-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -128,7 +128,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -230,7 +230,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -433,7 +433,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -663,7 +663,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -451,7 +451,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -700,7 +700,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Get-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -158,7 +158,7 @@ function Set-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -285,7 +285,7 @@ function Test-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function Get-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -398,7 +398,7 @@ function Set-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -623,7 +623,7 @@ function Test-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Get-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -168,7 +168,7 @@ function Set-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -269,7 +269,7 @@ function Test-TargetResource
[Parameter(Mandatory = $True)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -121,7 +121,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -201,7 +201,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -382,7 +382,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -611,7 +611,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -277,7 +277,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -463,7 +463,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -346,7 +346,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -559,7 +559,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -281,7 +281,7 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -466,7 +466,7 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
$Ensure,
$Ensure = $true,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Loading

0 comments on commit 9fb8973

Please sign in to comment.