File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Modules/CIPPCore/Public/Alerts Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ function Get-CIPPAlertAppleTerms {
2+ <#
3+ . FUNCTIONALITY
4+ Entrypoint
5+ #>
6+ [CmdletBinding ()]
7+ Param (
8+ [Parameter (Mandatory = $false )]
9+ [Alias (' input' )]
10+ $InputValue ,
11+ $TenantFilter
12+ )
13+
14+ # 0 = Expired
15+ # 1 = expired?
16+ # 2 = unknown
17+ # 3 = Terms & Conditions
18+ # 4 = Warning
19+
20+ try {
21+ $appleterms = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings" - tenantid $TenantFilter
22+ } catch {
23+ return
24+ }
25+
26+ if ($appleterms.lastSyncErrorCode -eq 3 ) {
27+ $AlertData = " New Apple Business Manager terms are ready to accept."
28+ Write-AlertTrace - cmdletName $MyInvocation.MyCommand - tenantFilter $TenantFilter - data $AlertData
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments