Jump to content


CraigSCCM

Export User Collection with Primary Devices

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 :(

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.