Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions AddAADDeviceToAADGroup/AddAADDeviceToAADGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
GitHub Repository: https://github.com/roalhelm/

.CHANGES
Version 1.4 (2025-06-27):
- Added compatibility for groups with more than 100 members

Version 1.3 (2025-04-28):
- Added CSV header validation to ensure "DeviceName" column exists
- Added detailed error messaging for CSV format issues
Expand Down Expand Up @@ -39,9 +42,9 @@
.AUTHOR

Original script by Ronny Alhelm
Version : 1.3
Version : 1.4
Creation Date : 2025-03-10
Last Modified : 2025-04-28
Last Modified : 2025-06-27

.EXAMPLE
PS C:\> .\Add-DevicesToAADGroup.ps1
Expand Down Expand Up @@ -117,7 +120,7 @@ try {
}

# Get the current members of the group
$groupMembers = Get-AzureADGroupMember -ObjectId $groupObj.ObjectId | Select-Object -ExpandProperty ObjectId
$groupMembers = Get-AzureADGroupMember -ObjectId $groupObj.ObjectId -All $true | Select-Object -ExpandProperty ObjectId

# Define log files with timestamps
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
Expand Down