Skip to content

Commit f553905

Browse files
committed
fix capabilitylevel
1 parent c08581b commit f553905

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardsharingCapability.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,18 @@ function Invoke-CIPPStandardsharingCapability {
7070
}
7171

7272
if ($Settings.alert -eq $true) {
73-
7473
if ($CurrentInfo.sharingCapability -eq $level) {
7574
Write-LogMessage -API 'Standards' -tenant $Tenant -message "Sharing level is set to $level" -sev Info
76-
$FieldValue = $true
7775
} else {
7876
Write-StandardsAlert -message "Sharing level is not set to $level" -object $CurrentInfo -tenant $Tenant -standardName 'sharingCapability' -standardId $Settings.standardId
7977
Write-LogMessage -API 'Standards' -tenant $Tenant -message "Sharing level is not set to $level" -sev Info
78+
}
79+
}
80+
81+
if ($Settings.report -eq $true) {
82+
if ($CurrentInfo.sharingCapability -eq $level) {
83+
$FieldValue = $true
84+
} else {
8085
$FieldValue = $CurrentInfo | Select-Object -Property sharingCapability
8186
}
8287
Set-CIPPStandardsCompareField -FieldName 'standards.sharingCapability' -FieldValue $FieldValue -Tenant $Tenant

0 commit comments

Comments
 (0)