Skip to content

Commit 76201f6

Browse files
authored
Merge pull request #363 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents e3cf2e6 + 71fb7c3 commit 76201f6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ function Invoke-CIPPStandardIntuneTemplate {
7272
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - Compared JSON: $($Compare | ConvertTo-Json -Compress)"
7373
} else {
7474
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - No existing policy found."
75+
$compare = [pscustomobject]@{
76+
MatchFailed = $true
77+
Difference = 'This policy does not exist in Intune.'
78+
}
7579
}
7680
if ($Compare) {
7781
Write-Host "IntuneTemplate: $($Template.TemplateList.value) - Compare found differences."
@@ -112,7 +116,7 @@ function Invoke-CIPPStandardIntuneTemplate {
112116
}
113117
}
114118

115-
If ($true -in $Settings.remediate) {
119+
if ($true -in $Settings.remediate) {
116120
Write-Host 'starting template deploy'
117121
foreach ($TemplateFile in $CompareList | Where-Object -Property remediate -EQ $true) {
118122
Write-Host "working on template deploy: $($TemplateFile.displayname)"
@@ -146,7 +150,7 @@ function Invoke-CIPPStandardIntuneTemplate {
146150
}
147151

148152
if ($true -in $Settings.report) {
149-
foreach ($Template in $CompareList | Where-Object -Property report -EQ $true) {
153+
foreach ($Template in $CompareList | Where-Object { $_.report -eq $true -or $_.remediate -eq $true }) {
150154
Write-Host "working on template report: $($Template.displayname)"
151155
$id = $Template.templateId
152156
$CompareObj = $Template.compare

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ function Invoke-CIPPStandardSPDirectSharing {
3333
param($Tenant, $Settings)
3434
Test-CIPPStandardLicense -StandardName 'SPDirectSharing' -TenantFilter $Tenant -RequiredCapabilities @('SHAREPOINTWAC', 'SHAREPOINTSTANDARD', 'SHAREPOINTENTERPRISE', 'ONEDRIVE_BASIC', 'ONEDRIVE_ENTERPRISE')
3535

36-
Write-LogMessage -API 'Standards' -Tenant $Tenant -Message 'This standard has been deprecated in favor of the "Set Default Sharing Link Settings" standard. Please update your standards to use new standard. However this will continue to function.' -Sev Alert
37-
36+
Write-LogMessage -API 'Standards' -Tenant $Tenant -Message 'The default sharing to Direct users standard has been deprecated in favor of the "Set Default Sharing Link Settings" standard. Please update your standards to use new standard. However this will continue to function.' -Sev Alert
3837
$CurrentState = Get-CIPPSPOTenant -TenantFilter $Tenant |
39-
Select-Object -Property _ObjectIdentity_, TenantFilter, DefaultSharingLinkType
38+
Select-Object -Property _ObjectIdentity_, TenantFilter, DefaultSharingLinkType
4039

4140
$StateIsCorrect = ($CurrentState.DefaultSharingLinkType -eq 'Direct' -or $CurrentState.DefaultSharingLinkType -eq 1)
4241

0 commit comments

Comments
 (0)