-
-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathIntuneAssignmentChecker.psm1
More file actions
39 lines (34 loc) · 1.58 KB
/
Copy pathIntuneAssignmentChecker.psm1
File metadata and controls
39 lines (34 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#Requires -Version 7.0
#Requires -Modules Microsoft.Graph.Authentication
# Module-scoped variables (set by Connect-IntuneAssignmentChecker)
$script:GraphEndpoint = $null
$script:GraphEnvironment = $null
$script:CurrentTenantId = $null
$script:CurrentTenantName = $null
$script:CurrentUserUPN = $null
$script:TemplateIdToFamilyCache = $null
$script:ScopeTagLookup = $null
$script:IntentTemplateSubtypeToFamily = @{
'antivirus' = 'endpointSecurityAntivirus'
'diskEncryption' = 'endpointSecurityDiskEncryption'
'firewall' = 'endpointSecurityFirewall'
'endpointDetectionAndResponse' = 'endpointSecurityEndpointDetectionAndResponse'
'attackSurfaceReduction' = 'endpointSecurityAttackSurfaceReduction'
'accountProtection' = 'endpointSecurityAccountProtection'
}
# Dot-source all private functions
$Private = @(Get-ChildItem -Path "$PSScriptRoot/Private/*.ps1" -ErrorAction SilentlyContinue)
foreach ($file in $Private) {
try { . $file.FullName }
catch { Write-Error "Failed to load $($file.FullName): $_" }
}
# Dot-source all public functions
$Public = @(Get-ChildItem -Path "$PSScriptRoot/Public/*.ps1" -ErrorAction SilentlyContinue)
foreach ($file in $Public) {
try { . $file.FullName }
catch { Write-Error "Failed to load $($file.FullName): $_" }
}
# Create alias for interactive mode
New-Alias -Name 'IntuneAssignmentChecker' -Value 'Invoke-IntuneAssignmentChecker' -Force
# Export public functions and alias
Export-ModuleMember -Function $Public.BaseName -Alias 'IntuneAssignmentChecker'