Skip to content

Export User Collection with Primary Devices

Featured Replies

Hey guys, I've run into a brick wall with this one :(

 

I have a User Collection which has 500 members in, I would like to export this collection to csv containing all the primary devices which are linked to what user?

 

Is this possible with CM Powershell or a Query...any help would be greatly appreciated :)

 

Thanks

That's not gonna work, since there can be several Primary Devices for a single user, and you're only able to have one of them per line. You'd have to have duplicate lines for the users.

 

I've created a couple of scripts related to Primary Users/Devices, maybe they can be an inspiration for you:

 

https://github.com/NickolajA/PowerShell/tree/master/ConfigMgr/Users

  • Author

Hi thanks for the reply Nick, your script isn't really going to work for me, as there are 500 Users in this Collection (i didn't create this, they were added in manually by someone *sigh*)

 

:( is there no way to get the Primary Computer Device for each user in that collection, either by a Query or script :(

Yes there is, but you'll most likely not find any script that does exactly what you're looking for (or perhaps you will). I'm just saying that you could look at my scripts to perhaps get an understanding of what classes you'd have to work with when you create your own :)

  • Author

Have you looked at the built-in reports for this?

Hi GarthMJ

 

I found "User device affinity associations per collection" report

 

This worked perfectly, i had to filter the csv when exported for the information, but it provided me the data that i want

 

Thank you

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.