-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJamfAssignmentChecker.ps1
More file actions
621 lines (509 loc) · 25.4 KB
/
JamfAssignmentChecker.ps1
File metadata and controls
621 lines (509 loc) · 25.4 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
#Requires -Version 7.0
<#
.SYNOPSIS
Checks JAMF Pro policy and configuration profile assignments for computers, users, and groups.
.DESCRIPTION
This script helps IT administrators analyze and audit JAMF Pro assignments by:
- Checking assignments for specific computers, users, or groups
- Showing all policies and profiles with their assignments
.NOTES
Version: 1.1.0
Author: Jorgeasaurus
Creation Date: 2024-12-29
Last Modified: 2025-09-16
Version History:
1.1.0 - Added group assignment analysis feature (Option 3)
Support for analyzing how computer and mobile device groups are used
Added Export-GroupAssignmentsToCSV for detailed reporting
1.0.0 - Initial release with computer and mobile device assignment checking
- Finding policies and profiles without assignments
- Identifying empty groups in assignments
- Analyzing smart group memberships and their impact
- Exporting results to CSV and HTML formats
.PARAMETER CheckComputer
Check assignments for specific computers.
.PARAMETER ComputerNames
Computer names to check, comma-separated.
.PARAMETER CheckUser
Check assignments for specific users.
.PARAMETER UserNames
User names to check, comma-separated.
.PARAMETER CheckGroup
Check assignments for specific groups.
.PARAMETER GroupNames
Group names to check, comma-separated.
.PARAMETER CheckMobileDevice
Check assignments for specific mobile devices.
.PARAMETER MobileDeviceNames
Mobile device names to check, comma-separated.
.PARAMETER ShowAllPolicies
Show all policies and their assignments.
.PARAMETER ShowAllProfiles
Show all configuration profiles and their assignments.
.PARAMETER FindUnassignedPolicies
Find policies without any assignments.
.PARAMETER FindUnassignedProfiles
Find configuration profiles without any assignments.
.PARAMETER FindEmptyGroups
Check for empty groups in assignments.
.PARAMETER ShowAllComputerAssignments
Show assignments for ALL computers in the environment.
.PARAMETER ShowAllUserAssignments
Show assignments for ALL users in the environment.
.PARAMETER GenerateHTMLReport
Generate comprehensive HTML report.
.PARAMETER ExportToCSV
Export results to CSV file.
.PARAMETER ExportPath
Path for the exported CSV/HTML file.
.PARAMETER Server
JAMF Pro server URL (e.g., company.jamfcloud.com).
.PARAMETER Username
Username for JAMF Pro authentication (Basic Auth).
.PARAMETER Password
Password for JAMF Pro authentication (Basic Auth).
.PARAMETER ClientId
Client ID for OAuth authentication.
.PARAMETER ClientSecret
Client Secret for OAuth authentication.
.EXAMPLE
.\JamfAssignmentChecker.ps1 -CheckComputer -ComputerNames "MacBook-001" -Server "company.jamfcloud.com" -Username "admin" -Password "pass"
Checks assignments for the specified computer using basic authentication.
.EXAMPLE
.\JamfAssignmentChecker.ps1 -CheckUser -UserNames "john.doe" -Server "company.jamfcloud.com" -ClientId "client" -ClientSecret "secret"
Checks assignments for the specified user using OAuth authentication.
.EXAMPLE
.\JamfAssignmentChecker.ps1 -CheckMobileDevice -MobileDeviceNames "iPad-001" -ExportToCSV -ExportPath "C:\Reports\MobileAssignments.csv"
Checks assignments for the specified mobile device and exports the results to CSV.
.EXAMPLE
.\JamfAssignmentChecker.ps1 -ShowAllPolicies -ExportToCSV -ExportPath "C:\Reports\JamfPolicies.csv"
Shows all policies and exports the results to CSV.
.AUTHOR
Jorge Suarez (@jorgeasaurus)
Based on IntuneAssignmentChecker by Ugur Koc (@ugurkocde)
GitHub: https://github.com/jorgeasaurus/JamfAssignmentChecker
.REQUIRED PERMISSIONS
- Read access to Computers and Computer Groups
- Read access to Users and User Groups
- Read access to Policies
- Read access to Configuration Profiles
- Read access to PreStages (if checking prestage assignments)
#>
param(
[Parameter(Mandatory = $false, HelpMessage = "Check assignments for specific computers")]
[switch]$CheckComputer,
[Parameter(Mandatory = $false, HelpMessage = "Computer names to check, comma-separated")]
[string]$ComputerNames,
[Parameter(Mandatory = $false, HelpMessage = "Check assignments for specific users")]
[switch]$CheckUser,
[Parameter(Mandatory = $false, HelpMessage = "User names to check, comma-separated")]
[string]$UserNames,
[Parameter(Mandatory = $false, HelpMessage = "Check assignments for specific groups")]
[switch]$CheckGroup,
[Parameter(Mandatory = $false, HelpMessage = "Group names to check, comma-separated")]
[string]$GroupNames,
[Parameter(Mandatory = $false, HelpMessage = "Check assignments for specific mobile devices")]
[switch]$CheckMobileDevice,
[Parameter(Mandatory = $false, HelpMessage = "Mobile device names to check, comma-separated")]
[string]$MobileDeviceNames,
[Parameter(Mandatory = $false, HelpMessage = "Show all policies and their assignments")]
[switch]$ShowAllPolicies,
[Parameter(Mandatory = $false, HelpMessage = "Show all configuration profiles and their assignments")]
[switch]$ShowAllProfiles,
[Parameter(Mandatory = $false, HelpMessage = "Find policies without assignments")]
[switch]$FindUnassignedPolicies,
[Parameter(Mandatory = $false, HelpMessage = "Find configuration profiles without assignments")]
[switch]$FindUnassignedProfiles,
[Parameter(Mandatory = $false, HelpMessage = "Check for empty groups in assignments")]
[switch]$FindEmptyGroups,
[Parameter(Mandatory = $false, HelpMessage = "Show assignments for ALL computers")]
[switch]$ShowAllComputerAssignments,
[Parameter(Mandatory = $false, HelpMessage = "Show assignments for ALL users")]
[switch]$ShowAllUserAssignments,
[Parameter(Mandatory = $false, HelpMessage = "Generate HTML report")]
[switch]$GenerateHTMLReport,
[Parameter(Mandatory = $false, HelpMessage = "Export results to CSV")]
[switch]$ExportToCSV,
[Parameter(Mandatory = $false, HelpMessage = "Path for the exported CSV/HTML file")]
[string]$ExportPath,
[Parameter(Mandatory = $false, HelpMessage = "JAMF Pro server URL")]
[string]$BaseUrl,
[Parameter(Mandatory = $false, HelpMessage = "Username for JAMF Pro authentication")]
[string]$Username,
[Parameter(Mandatory = $false, HelpMessage = "Password for JAMF Pro authentication")]
[string]$Password,
[Parameter(Mandatory = $false, HelpMessage = "Client ID for OAuth authentication")]
[string]$ClientId,
[Parameter(Mandatory = $false, HelpMessage = "Client Secret for OAuth authentication")]
[string]$ClientSecret
)
# Script version
$script:Version = "1.1.0"
# Check if any command-line parameters were provided
$parameterMode = $false
$selectedOption = $null
if ($CheckComputer) { $parameterMode = $true; $selectedOption = '1' }
elseif ($CheckUser) { $parameterMode = $true; $selectedOption = '2' }
elseif ($CheckGroup) { $parameterMode = $true; $selectedOption = '3' }
elseif ($CheckMobileDevice) { $parameterMode = $true; $selectedOption = '4' }
elseif ($ShowAllComputerAssignments) { $parameterMode = $true; $selectedOption = '5' }
elseif ($ShowAllUserAssignments) { $parameterMode = $true; $selectedOption = '6' }
elseif ($ShowAllPolicies) { $parameterMode = $true; $selectedOption = '7' }
elseif ($ShowAllProfiles) { $parameterMode = $true; $selectedOption = '8' }
elseif ($FindUnassignedPolicies) { $parameterMode = $true; $selectedOption = '9' }
elseif ($FindUnassignedProfiles) { $parameterMode = $true; $selectedOption = '10' }
elseif ($FindEmptyGroups) { $parameterMode = $true; $selectedOption = '11' }
elseif ($GenerateHTMLReport) { $parameterMode = $true; $selectedOption = '12' }
# Display header
Write-Host ""
Write-Host ""
Write-Host "🔍 JAMF ASSIGNMENT CHECKER" -ForegroundColor Cyan
Write-Host "Made by Jorgeasaurus 🚀 | Version $script:Version | Last updated: 2025-09-16"
Write-Host ""
Write-Host "Inspired by Ugur Koc's IntuneAssignmentChecker" -ForegroundColor Gray
Write-Host ""
# Load the PowerShell functions (force reload)
$Functions = Get-ChildItem -Path "$(Get-Location)\Functions\*.ps1" -ErrorAction SilentlyContinue
foreach ($function in $Functions) {
try {
# Force reload by removing any existing function definition first
$functionName = [System.IO.Path]::GetFileNameWithoutExtension($function.Name)
if (Get-Command $functionName -ErrorAction SilentlyContinue) {
Remove-Item "Function:\$functionName" -ErrorAction SilentlyContinue
}
. $function.FullName
} catch {
Write-Error "Failed to import function $($function.FullName): $_"
}
}
# Script configuration hashtable (will be populated from config.ps1 or user input)
$script:Config = @{
BaseUrl = ""
Username = ""
Password = ""
ClientId = ""
ClientSecret = ""
Token = ""
ApiVersion = "classic" # Default to classic API
DataFolder = "" # For compatibility with imported functions
}
# Establish JAMF Pro connection
if (-not (Connect-JamfPro)) {
Write-Host "Failed to establish connection to JAMF Pro. Exiting." -ForegroundColor Red
exit 1
}
# Main execution logic
if ($parameterMode) {
# Execute based on command-line parameters
switch ($selectedOption) {
'1' {
# Check Computer Assignments
if ([string]::IsNullOrWhiteSpace($ComputerNames)) {
Write-Host "ERROR: ComputerNames parameter is required when using -CheckComputer" -ForegroundColor Red
exit 1
}
$computers = $ComputerNames -split ','
$allAssignments = @()
foreach ($computerName in $computers) {
$computerName = $computerName.Trim()
Write-Host "`nSearching for computer: $computerName" -ForegroundColor Cyan
$computer = Get-JamfComputer -ComputerName $computerName
if ($computer) {
$assignments = Get-ComputerAssignments -Computer $computer
Show-ComputerAssignments -Assignments $assignments
$allAssignments += $assignments
} else {
Write-Host "Computer '$computerName' not found!" -ForegroundColor Red
}
}
# Export if requested
if ($ExportToCSV -and $allAssignments.Count -gt 0) {
Export-AssignmentsToCSV -Assignments $allAssignments -FilePath $ExportPath
}
}
'2' {
# Check User Assignments
Write-Host "User assignment checking not yet implemented." -ForegroundColor Yellow
}
'3' {
# Check Group Assignments
if ([string]::IsNullOrWhiteSpace($GroupNames)) {
if (-not $parameterMode) {
Write-Host "`nEnter group name(s) to check (comma-separated for multiple):" -ForegroundColor Cyan
$GroupNames = Read-Host
}
if ([string]::IsNullOrWhiteSpace($GroupNames)) {
Write-Host "ERROR: Group name(s) required" -ForegroundColor Red
if ($parameterMode) { exit 1 }
continue
}
}
# Ask for group type if not in parameter mode
$groupType = "Computer"
if (-not $parameterMode) {
Write-Host "`nSelect group type:" -ForegroundColor Cyan
Write-Host " [1] Computer Group (default)" -ForegroundColor White
Write-Host " [2] Mobile Device Group" -ForegroundColor White
$typeChoice = Read-Host "Choice (1 or 2)"
if ($typeChoice -eq "2") {
$groupType = "MobileDevice"
}
}
$groups = $GroupNames -split ','
$allAssignments = @()
foreach ($groupName in $groups) {
$groupName = $groupName.Trim()
Write-Host "`nAnalyzing group: $groupName ($groupType)" -ForegroundColor Cyan
$assignments = Get-GroupAssignments -GroupName $groupName -GroupType $groupType
if ($assignments) {
Show-GroupAssignments -Assignments $assignments
$allAssignments += $assignments
} else {
Write-Host "Failed to analyze group '$groupName'" -ForegroundColor Red
}
}
# Export if requested
if ($ExportToCSV -and $allAssignments.Count -gt 0) {
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = ".\GroupAssignments_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
}
Export-GroupAssignmentsToCSV -Assignments $allAssignments -FilePath $ExportPath
}
if (-not $parameterMode) {
Read-Host "`nPress Enter to continue"
}
}
'4' {
# Check Mobile Device Assignments
if ([string]::IsNullOrWhiteSpace($MobileDeviceNames)) {
Write-Host "ERROR: MobileDeviceNames parameter is required when using -CheckMobileDevice" -ForegroundColor Red
exit 1
}
$mobileDevices = $MobileDeviceNames -split ','
$allAssignments = @()
foreach ($mobileDeviceName in $mobileDevices) {
$mobileDeviceName = $mobileDeviceName.Trim()
Write-Host "`nSearching for mobile device: $mobileDeviceName" -ForegroundColor Cyan
$mobileDevice = Get-JamfMobileDevice -MobileDeviceName $mobileDeviceName
if ($mobileDevice) {
$assignments = Get-MobileDeviceAssignments -MobileDevice $mobileDevice
Show-MobileDeviceAssignments -Assignments $assignments
$allAssignments += $assignments
} else {
Write-Host "Mobile device '$mobileDeviceName' not found!" -ForegroundColor Red
}
}
# Export if requested
if ($ExportToCSV -and $allAssignments.Count -gt 0) {
Export-MobileDeviceAssignmentsToCSV -Assignments $allAssignments -FilePath $ExportPath
}
}
'5' {
# Show ALL Computer Assignments
$allAssignments = Show-AllComputerAssignments -ExportToCSV:$ExportToCSV -ExportPath $ExportPath
}
'6' {
# Show ALL User Assignments
$allAssignments = Show-AllUserAssignments -ExportToCSV:$ExportToCSV -ExportPath $ExportPath
}
'7' {
# Show All Policies
$allPolicies = Show-AllPolicies -IncludeDisabled:$false
if ($ExportToCSV) {
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = "$env:temp\JamfAllPolicies_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
}
Export-PoliciesToCSV -Policies $allPolicies -FilePath $ExportPath
}
}
'8' {
# Show All Profiles
$allProfiles = Show-AllProfiles
if ($ExportToCSV) {
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = "$env:temp\JamfAllProfiles_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
}
Export-ProfilesToCSV -Profiles $allProfiles -FilePath $ExportPath
}
}
'9' {
# Find Unassigned Policies
$unassignedPolicies = Find-UnassignedPolicies
if ($ExportToCSV -and $unassignedPolicies.Count -gt 0) {
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = "$env:temp\JamfUnassignedPolicies_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
}
$unassignedPolicies | Export-Csv -Path $ExportPath -NoTypeInformation -Force
Write-Host "Exported to: $ExportPath" -ForegroundColor Green
}
}
'10' {
# Find Unassigned Profiles
$unassignedProfiles = Find-UnassignedProfiles
if ($ExportToCSV -and $unassignedProfiles.Count -gt 0) {
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = "$env:temp\JamfUnassignedProfiles_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv"
}
$unassignedProfiles | Export-Csv -Path $ExportPath -NoTypeInformation -Force
Write-Host "Exported to: $ExportPath" -ForegroundColor Green
}
}
'11' {
# Find Empty Groups
Write-Host "Find empty groups not yet implemented." -ForegroundColor Yellow
}
'12' {
# Generate HTML Report
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = "$env:temp\JamfAssignmentReport_$(Get-Date -Format 'yyyyMMdd_HHmmss').html"
}
Export-JamfHTMLReport -FilePath $ExportPath
}
}
} else {
# Interactive mode
do {
$choice = Show-MainMenu
switch ($choice) {
'1' {
# Check Computer Assignments
$computerName = Read-Host "Enter computer name"
$computer = Get-JamfComputer -ComputerName $computerName
if ($computer) {
$assignments = Get-ComputerAssignments -Computer $computer
Show-ComputerAssignments -Assignments $assignments
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\assignments.csv)"
Export-AssignmentsToCSV -Assignments @($assignments) -FilePath $path
}
} else {
Write-Host "Computer not found!" -ForegroundColor Red
}
Read-Host "`nPress Enter to continue"
}
'2' {
# Check User Assignments
Write-Host "User assignment checking not yet implemented." -ForegroundColor Yellow
}
'3' {
# Check Group Assignments
Write-Host "Group assignment checking not yet implemented." -ForegroundColor Yellow
}
'4' {
# Check Mobile Device Assignments
$mobileDeviceName = Read-Host "Enter mobile device name"
$mobileDevice = Get-JamfMobileDevice -MobileDeviceName $mobileDeviceName
if ($mobileDevice) {
$assignments = Get-MobileDeviceAssignments -MobileDevice $mobileDevice
Show-MobileDeviceAssignments -Assignments $assignments
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\mobile-assignments.csv)"
Export-MobileDeviceAssignmentsToCSV -Assignments @($assignments) -FilePath $path
}
} else {
Write-Host "Mobile device not found!" -ForegroundColor Red
}
Read-Host "`nPress Enter to continue"
}
'5' {
# Show ALL Computer Assignments
Write-Host "⚠️ This will analyze ALL computers in your environment and may take some time." -ForegroundColor Yellow
$confirm = Read-Host "Do you want to continue? (y/n)"
if ($confirm -eq 'y') {
$export = Read-Host "Export to CSV? (y/n)"
$exportPath = $null
if ($export -eq 'y') {
$exportPath = Read-Host "Enter export path (e.g., C:\Reports\all-computer-assignments.csv)"
}
$allAssignments = Show-AllComputerAssignments -ExportToCSV:($export -eq 'y') -ExportPath $exportPath
}
Read-Host "`nPress Enter to continue"
}
'6' {
# Show ALL User Assignments
Write-Host "⚠️ This will analyze ALL users in your environment and may take some time." -ForegroundColor Yellow
$confirm = Read-Host "Do you want to continue? (y/n)"
if ($confirm -eq 'y') {
$export = Read-Host "Export to CSV? (y/n)"
$exportPath = $null
if ($export -eq 'y') {
$exportPath = Read-Host "Enter export path (e.g., C:\Reports\all-user-assignments.csv)"
}
$allAssignments = Show-AllUserAssignments -ExportToCSV:($export -eq 'y') -ExportPath $exportPath
}
Read-Host "`nPress Enter to continue"
}
'7' {
# Show All Policies
$includeDisabled = Read-Host "Include disabled policies? (y/n)"
$allPolicies = Show-AllPolicies -IncludeDisabled:($includeDisabled -eq 'y')
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\policies.csv)"
Export-PoliciesToCSV -Policies $allPolicies -FilePath $path
}
Read-Host "`nPress Enter to continue"
}
'8' {
# Show All Profiles
$allProfiles = Show-AllProfiles
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\profiles.csv)"
Export-ProfilesToCSV -Profiles $allProfiles -FilePath $path
}
Read-Host "`nPress Enter to continue"
}
'9' {
# Find Unassigned Policies
$unassignedPolicies = Find-UnassignedPolicies
if ($unassignedPolicies.Count -gt 0) {
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\unassigned-policies.csv)"
$unassignedPolicies | Export-Csv -Path $path -NoTypeInformation -Force
Write-Host "Exported to: $path" -ForegroundColor Green
}
}
Read-Host "`nPress Enter to continue"
}
'10' {
# Find Unassigned Profiles
$unassignedProfiles = Find-UnassignedProfiles
if ($unassignedProfiles.Count -gt 0) {
$export = Read-Host "`nExport to CSV? (y/n)"
if ($export -eq 'y') {
$path = Read-Host "Enter export path (e.g., C:\Reports\unassigned-profiles.csv)"
$unassignedProfiles | Export-Csv -Path $path -NoTypeInformation -Force
Write-Host "Exported to: $path" -ForegroundColor Green
}
}
Read-Host "`nPress Enter to continue"
}
'11' {
# Find Empty Groups
Write-Host "Find empty groups not yet implemented." -ForegroundColor Yellow
Read-Host "`nPress Enter to continue"
}
'12' {
# Generate HTML Report
$ExportPath = Read-Host "Enter export path for HTML report (e.g., C:\Reports\jamf-report.html)"
if ([string]::IsNullOrWhiteSpace($ExportPath)) {
$ExportPath = ".\JamfAssignmentReport_$(Get-Date -Format 'yyyyMMdd_HHmmss').html"
}
Export-JamfHTMLReport -FilePath $ExportPath
Read-Host "`nPress Enter to continue"
}
'0' {
Write-Host "`nThank you for using JAMF Assignment Checker! 👋" -ForegroundColor Green
break
}
default {
Write-Host "Invalid choice. Please try again." -ForegroundColor Red
Start-Sleep -Seconds 1
}
}
} while ($choice -ne '0')
}