Skip to content

Commit ed1d75d

Browse files
standardss fix
1 parent e95b5f3 commit ed1d75d

File tree

99 files changed

+680
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+680
-98
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ function Invoke-CIPPStandardAddDKIM {
3232

3333
param($Tenant, $Settings)
3434
#$Rerun -Type Standard -Tenant $Tenant -API 'AddDKIM' -Settings $Settings
35-
Test-CIPPStandardLicense -StandardName 'AddDKIM' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
35+
$TestResult = Test-CIPPStandardLicense -StandardName 'AddDKIM' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
36+
37+
if ($TestResult -eq $false) {
38+
Write-Host "We're exiting as the correct license is not present for this standard."
39+
return $true
40+
} #we're done.
3641

3742
$DkimRequest = @(
3843
@{

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ function Invoke-CIPPStandardAntiPhishPolicy {
5050
#>
5151

5252
param($Tenant, $Settings)
53-
Test-CIPPStandardLicense -StandardName 'AntiPhishPolicy' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
53+
$TestResult = Test-CIPPStandardLicense -StandardName 'AntiPhishPolicy' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
54+
55+
if ($TestResult -eq $false) {
56+
Write-Host "We're exiting as the correct license is not present for this standard."
57+
return $true
58+
} #we're done.
5459
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AntiPhishPolicy'
5560

5661
$ServicePlans = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/subscribedSkus?$select=servicePlans' -tenantid $Tenant

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function Invoke-CIPPStandardAntiSpamSafeList {
2929
#>
3030

3131
param($Tenant, $Settings)
32-
Test-CIPPStandardLicense -StandardName 'AntiSpamSafeList' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
32+
$TestResult = Test-CIPPStandardLicense -StandardName 'AntiSpamSafeList' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
33+
34+
if ($TestResult -eq $false) {
35+
Write-Host "We're exiting as the correct license is not present for this standard."
36+
return $true
37+
} #we're done.
3338
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AntiSpamSafeList'
3439

3540
try {

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ function Invoke-CIPPStandardAtpPolicyForO365 {
3131
#>
3232

3333
param($Tenant, $Settings)
34-
Test-CIPPStandardLicense -StandardName 'AtpPolicyForO365' -TenantFilter $Tenant -RequiredCapabilities @('SHAREPOINTWAC', 'SHAREPOINTSTANDARD', 'SHAREPOINTENTERPRISE', 'ONEDRIVE_BASIC', 'ONEDRIVE_ENTERPRISE')
34+
$TestResult = Test-CIPPStandardLicense -StandardName 'AtpPolicyForO365' -TenantFilter $Tenant -RequiredCapabilities @('SHAREPOINTWAC', 'SHAREPOINTSTANDARD', 'SHAREPOINTENTERPRISE', 'ONEDRIVE_BASIC', 'ONEDRIVE_ENTERPRISE')
3535
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AtpPolicyForO365'
36+
37+
if ($TestResult -eq $false) {
38+
Write-Host "We're exiting as the correct license is not present for this standard."
39+
return $true
40+
} #we're done.
3641
try {
3742
$CurrentState = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-AtpPolicyForO365' |
3843
Select-Object EnableATPForSPOTeamsODB, EnableSafeDocs, AllowSafeDocsOpen

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ function Invoke-CIPPStandardAuditLog {
3232
#>
3333

3434
param($Tenant, $Settings)
35-
Test-CIPPStandardLicense -StandardName 'AuditLog' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
35+
$TestResult = Test-CIPPStandardLicense -StandardName 'AuditLog' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
36+
37+
if ($TestResult -eq $false) {
38+
Write-Host "We're exiting as the correct license is not present for this standard."
39+
return $true
40+
} #we're done.
3641
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AuditLog'
3742

3843
Write-Host ($Settings | ConvertTo-Json)

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ function Invoke-CIPPStandardAutoExpandArchive {
2828
#>
2929

3030
param($Tenant, $Settings)
31-
Test-CIPPStandardLicense -StandardName 'AutoExpandArchive' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
31+
$TestResult = Test-CIPPStandardLicense -StandardName 'AutoExpandArchive' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
32+
33+
if ($TestResult -eq $false) {
34+
Write-Host "We're exiting as the correct license is not present for this standard."
35+
return $true
36+
} #we're done.
3237
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'AutoExpandArchive'
3338

3439
$CurrentState = (New-ExoRequest -tenantid $Tenant -cmdlet 'Get-OrganizationConfig').AutoExpandingArchiveEnabled

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,14 @@ function Invoke-CIPPStandardAutopilotProfile {
4040
https://docs.cipp.app/user-documentation/tenant/standards/list-standards
4141
#>
4242
param($Tenant, $Settings)
43-
Test-CIPPStandardLicense -StandardName 'AutopilotProfile' -TenantFilter $Tenant -RequiredCapabilities @('INTUNE_A', 'MDM_Services', 'EMS', 'SCCM', 'MICROSOFTINTUNEPLAN1')
43+
$TestResult = Test-CIPPStandardLicense -StandardName 'AutopilotProfile' -TenantFilter $Tenant -RequiredCapabilities @('INTUNE_A', 'MDM_Services', 'EMS', 'SCCM', 'MICROSOFTINTUNEPLAN1')
4444

4545
# Get the current configuration
46+
47+
if ($TestResult -eq $false) {
48+
Write-Host "We're exiting as the correct license is not present for this standard."
49+
return $true
50+
} #we're done.
4651
try {
4752
# Replace variables in displayname to prevent duplicates
4853
$DisplayName = Get-CIPPTextReplacement -Text $Settings.DisplayName -TenantFilter $Tenant

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ function Invoke-CIPPStandardAutopilotStatusPage {
3636
https://docs.cipp.app/user-documentation/tenant/standards/list-standards
3737
#>
3838
param($Tenant, $Settings)
39-
Test-CIPPStandardLicense -StandardName 'AutopilotStatusPage' -TenantFilter $Tenant -RequiredCapabilities @('INTUNE_A', 'MDM_Services', 'EMS', 'SCCM', 'MICROSOFTINTUNEPLAN1')
39+
$TestResult = Test-CIPPStandardLicense -StandardName 'AutopilotStatusPage' -TenantFilter $Tenant -RequiredCapabilities @('INTUNE_A', 'MDM_Services', 'EMS', 'SCCM', 'MICROSOFTINTUNEPLAN1')
4040

4141
# Get current Autopilot enrollment status page configuration
42+
43+
if ($TestResult -eq $false) {
44+
Write-Host "We're exiting as the correct license is not present for this standard."
45+
return $true
46+
} #we're done.
4247
try {
4348
$CurrentConfig = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/deviceManagement/deviceEnrollmentConfigurations?`$expand=assignments&orderBy=priority&`$filter=deviceEnrollmentConfigurationType eq 'windows10EnrollmentCompletionPageConfiguration' and priority eq 0" -tenantid $Tenant |
4449
Select-Object -Property id, displayName, priority, showInstallationProgress, blockDeviceSetupRetryByUser, allowDeviceResetOnInstallFailure, allowLogCollectionOnInstallFailure, customErrorMessage, installProgressTimeoutInMinutes, allowDeviceUseOnInstallFailure, trackInstallProgressForAutopilotOnly

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function Invoke-CIPPStandardBookings {
2929
#>
3030

3131
param($Tenant, $Settings)
32-
Test-CIPPStandardLicense -StandardName 'Bookings' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
32+
$TestResult = Test-CIPPStandardLicense -StandardName 'Bookings' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
33+
34+
if ($TestResult -eq $false) {
35+
Write-Host "We're exiting as the correct license is not present for this standard."
36+
return $true
37+
} #we're done.
3338
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'Bookings'
3439

3540
# Get state value using null-coalescing operator

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function Invoke-CIPPStandardCloudMessageRecall {
2929
#>
3030

3131
param($Tenant, $Settings)
32-
Test-CIPPStandardLicense -StandardName 'CloudMessageRecall' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
32+
$TestResult = Test-CIPPStandardLicense -StandardName 'CloudMessageRecall' -TenantFilter $Tenant -RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE', 'EXCHANGE_LITE') #No Foundation because that does not allow powershell access
33+
34+
if ($TestResult -eq $false) {
35+
Write-Host "We're exiting as the correct license is not present for this standard."
36+
return $true
37+
} #we're done.
3338
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'CloudMessageRecall'
3439

3540
# Get state value using null-coalescing operator

0 commit comments

Comments
 (0)