Skip to content

Commit

Permalink
Reenabled PowerShellGroup resource for PS 7.4.0-rc.1 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
anmenaga committed Nov 7, 2023
1 parent 8ba2f6a commit 57d1fa3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions powershellgroup/powershellgroup.resource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ function RefreshCache
}
}

if (($PSVersionTable.PSVersion.Major -ge 7) -and ($PSVersionTable.PSVersion.Minor -ge 4))
if (($PSVersionTable.PSVersion.Major -ge 7) -and ($PSVersionTable.PSVersion.Minor -ge 4) `
-and ($PSVersionTable.PSVersion.PreReleaseLabel.StartsWith("preview")))
{
throw "PowerShell 7.4 is not currently supported by PowerShellGroup resource; please use PS 7.3. Tracking issue: https://github.com/PowerShell/DSC/issues/128"
throw "PowerShell 7.4-previews are not supported by PowerShellGroup resource; please use PS 7.4.0-rc.1 or newer."
}

$DscModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable |
Expand Down

0 comments on commit 57d1fa3

Please sign in to comment.