You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardDisableSelfServiceLicenses.ps1
+32-35Lines changed: 32 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,7 @@ function Invoke-CIPPStandardDisableSelfServiceLicenses {
38
38
} catch {
39
39
if ($_.Exception.Message-like'*403*') {
40
40
$Message="Failed to retrieve self service products: Insufficient permissions. Please ensure the tenant GDAP relationship includes the 'Billing Administrator' role: $($_.Exception.Message)"
41
-
}
42
-
else {
41
+
} else {
43
42
$Message="Failed to retrieve self service products: $($_.Exception.Message)"
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Failed to retrieve trial autoclaim policy after remediation: $($_.Exception.Message)"-sev Error
155
152
}
@@ -161,7 +158,7 @@ function Invoke-CIPPStandardDisableSelfServiceLicenses {
161
158
if (!$selfServiceItemsToAlert) {
162
159
Write-LogMessage-API 'Standards'-tenant $tenant-message 'All self-service licenses are disabled'-sev Info
163
160
} else {
164
-
Write-StandardsAlert-message "One or more self-service licenses are enabled"-object $selfServiceItemsToAlert-tenant $tenant-standardName 'DisableSelfServiceLicenses'-standardId $Settings.standardId
161
+
Write-StandardsAlert-message 'One or more self-service licenses are enabled'-object $selfServiceItemsToAlert-tenant $tenant-standardName 'DisableSelfServiceLicenses'-standardId $Settings.standardId
165
162
Write-LogMessage-API 'Standards'-tenant $tenant-message 'One or more self-service licenses are enabled'-sev Info
0 commit comments