Skip to content

Commit

Permalink
Merge branch 'main' into osinfo-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT authored Jan 31, 2024
2 parents 392c8e8 + 9afe0f2 commit 790e072
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions powershellgroup/powershellgroup.resource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function RefreshCache
$script:ResourceCache = @{}

$DscResources = Get-DscResource

foreach ($r in $DscResources)
{
$moduleName = "";
Expand All @@ -33,7 +33,7 @@ function RefreshCache
}
}

if (($PSVersionTable.PSVersion.Major -ge 7) -and ($PSVersionTable.PSVersion.Minor -ge 4) `
if (($PSVersionTable.PSVersion.Major -eq 7) -and ($PSVersionTable.PSVersion.Minor -eq 4) `
-and ($PSVersionTable.PSVersion.PreReleaseLabel.StartsWith("preview")))
{
throw "PowerShell 7.4-previews are not supported by PowerShellGroup resource; please use PS 7.4.0-rc.1 or newer."
Expand Down Expand Up @@ -153,7 +153,7 @@ elseif ($Operation -eq 'Get')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down Expand Up @@ -227,7 +227,7 @@ elseif ($Operation -eq 'Set')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down Expand Up @@ -301,7 +301,7 @@ elseif ($Operation -eq 'Test')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down

0 comments on commit 790e072

Please sign in to comment.