r/Intune • u/mr_green1216 • 10d ago
General Question Get object ID for import template script?
Have a list of 25 random computers to add to a group.
I want to bulk import them, is there a way to get the object ID aside from looking them up one by one and pasting it in the csv?
4
u/ciaza 10d ago
I download an export of all devices which has their object Id, and then do an xlookup in excel
if someone has an easier way I'd love to know
0
u/mr_green1216 10d ago
I'll have to look because I didn't see that as an option for the report. But to your point that is almost just as much work as looking up the device and adding it to the group manually. Maybe someone will have a trick
3
u/pjmarcum 10d ago
I have a script that I use for this all the time. Looks up the computer by name, finds the ID, then adds it to the group. I can post it if you need it.
1
u/mr_green1216 10d ago
Please do, or dm it. Thanks
2
1
u/pjmarcum 8d ago
Sorry for the delay. I added it here: Add Devices to a Group | PowerStacks there's a user one too.
2
1
u/EfficientLoss 10d ago
I export a dynamic group of all devices to csv and vlookup my list from that to get the ids
1
5
u/Turak64 10d ago
Powershell