CraigSCCM Posted October 6, 2015 Report post Posted October 6, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...
NickolajA Posted October 6, 2015 Report post Posted October 6, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...
CraigSCCM Posted October 7, 2015 Report post Posted October 7, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...
NickolajA Posted October 7, 2015 Report post Posted October 7, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted October 7, 2015 Report post Posted October 7, 2015 Have you looked at the built-in reports for this? Quote Share this post Link to post Share on other sites More sharing options...
CraigSCCM Posted October 12, 2015 Report post Posted October 12, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...