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/Entrypoints/HTTP Functions/Endpoint/Autopilot/Invoke-AddAPDevice.ps1
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,36 @@ function Invoke-AddAPDevice {
51
51
if ($NewStatus.status-ne'finished') { throw'Could not retrieve status of import - This job might still be running. Check the autopilot device list in 10 minutes for the latest status.' }
52
52
Write-LogMessage-headers $Request.Headers-API $APIName-tenant $($Request.body.TenantFilter.value) -message "Created Autopilot devices group. Group ID is $GroupName"-Sev 'Info'
53
53
54
+
# Apply group tags from CSV if any devices have them
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecUpdateDriftDeviation.ps1
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ function Invoke-ExecUpdateDriftDeviation {
9
9
param($Request,$TriggerMetadata)
10
10
11
11
$APIName=$TriggerMetadata.FunctionName
12
-
Write-LogMessage-user $request.headers.'x-ms-client-principal'-API $APINAME-message 'Accessed this API'-Sev 'Debug'
12
+
Write-LogMessage-Headers $Request.Headers-API $APINAME-message 'Accessed this API'-Sev 'Debug'
13
13
14
14
try {
15
15
$TenantFilter=$Request.Body.TenantFilter
@@ -25,7 +25,7 @@ function Invoke-ExecUpdateDriftDeviation {
25
25
success=$true
26
26
result="All drift customizations removed for tenant $TenantFilter"
27
27
})
28
-
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Removed all drift customizations for tenant $TenantFilter"-Sev 'Info'
28
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Removed all drift customizations for tenant $TenantFilter"-Sev 'Info'
29
29
} else {
30
30
$Deviations=$Request.Body.deviations
31
31
$Reason=$Request.Body.reason
@@ -39,7 +39,7 @@ function Invoke-ExecUpdateDriftDeviation {
39
39
success=$true
40
40
result=$Result
41
41
}
42
-
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Updated drift deviation status for $($Deviation.standardName) to $($Deviation.status) with reason: $Reason"-Sev 'Info'
42
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Updated drift deviation status for $($Deviation.standardName) to $($Deviation.status) with reason: $Reason"-Sev 'Info'
@@ -62,7 +62,7 @@ function Invoke-ExecUpdateDriftDeviation {
62
62
}
63
63
}
64
64
if (-not$MatchedTemplate) {
65
-
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Could not find IntuneTemplate $TemplateId in drift standard settings for remediation"-Sev 'Warn'
65
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Could not find IntuneTemplate $TemplateId in drift standard settings for remediation"-Sev 'Warn'
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Deleted Policy with ID $($ID)"-Sev 'Info'
151
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Deleted Policy with ID $($ID)"-Sev 'Info'
152
152
} else {
153
153
"could not find policy with ID $($ID)"
154
-
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Could not find Policy with ID $($ID) to delete for remediation"-sev 'Warn'
154
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Could not find Policy with ID $($ID) to delete for remediation"-sev 'Warn'
155
155
}
156
156
157
157
@@ -162,7 +162,7 @@ function Invoke-ExecUpdateDriftDeviation {
162
162
success=$false
163
163
error=$_.Exception.Message
164
164
}
165
-
Write-LogMessage-tenant $TenantFilter-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Failed to update drift deviation for $($Deviation.standardName): $($_.Exception.Message)"-Sev 'Error'
165
+
Write-LogMessage-tenant $TenantFilter-Headers $Request.Headers-API $APINAME-message "Failed to update drift deviation for $($Deviation.standardName): $($_.Exception.Message)"-Sev 'Error'
166
166
}
167
167
}
168
168
}
@@ -175,7 +175,7 @@ function Invoke-ExecUpdateDriftDeviation {
175
175
})
176
176
177
177
} catch {
178
-
Write-LogMessage-user $request.headers.'x-ms-client-principal'-API $APINAME-message "Failed to update drift deviation: $($_.Exception.Message)"-Sev 'Error'
178
+
Write-LogMessage-Headers $Request.Headers-API $APINAME-message "Failed to update drift deviation: $($_.Exception.Message)"-Sev 'Error'
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardDisableGuests.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ function Invoke-CIPPStandardDisableGuests {
121
121
Write-LogMessage-API 'Standards'-tenant $tenant-message "Failed to process bulk disable guests request: $($ErrorMessage.NormalizedError)"-sev Error -LogData $ErrorMessage
122
122
}
123
123
} else {
124
-
Write-LogMessage-API 'Standards'-tenant $tenant-message "No guests accounts with a login longer than $checkDays days ago."-sev Info
124
+
Write-LogMessage-API 'Standards'-tenant $tenant-message "No guests accounts with a login longer than $checkDays days ago - all guest accounts are already compliant."-sev Info
0 commit comments